Yeah, this really isn't wanting to work. Gonna need to probably redo everything

This commit is contained in:
2015-08-22 10:44:05 -07:00
parent 47fee51b08
commit 17207d8294
9 changed files with 226 additions and 63 deletions

View File

@@ -30,8 +30,14 @@ void App::Input() {
if (event.type == sf::Event::Closed)
window->close();
if (event.type == sf::Event::KeyPressed) {
if (event.key.code == sf::Keyboard::Space) {
if (event.key.code == sf::Keyboard::Q) {
explorer->setDestination(sf::Vector2i(20, 20));
}
if (event.key.code == sf::Keyboard::W) {
explorer->setDestination(sf::Vector2i(200, 200));
}
if (event.key.code == sf::Keyboard::E) {
explorer->setDestination(sf::Vector2i(100, 12));
}
}
}
@@ -39,6 +45,7 @@ void App::Input() {
void App::Update(double step_size) {
Input();
explorer->move();
}
void App::Render() {
@@ -91,7 +98,7 @@ void App::Render() {
}
}
// Draw the player
// Draw the explorer
for (int x2 = 1; x2 < 5; x2++) {
for (int y2 = 1; y2 < 5; y2++) {