From f639894a0dec836ef0e4bfa11006c4017bab3803 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Sat, 4 Jul 2020 15:21:44 -0500 Subject: [PATCH] Remove some uncommented code in snake example and change window name --- examples/snake/src/main.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/examples/snake/src/main.cpp b/examples/snake/src/main.cpp index 3c6fb28..2031ac5 100644 --- a/examples/snake/src/main.cpp +++ b/examples/snake/src/main.cpp @@ -73,9 +73,6 @@ public: } void Move(const float& delta_time, const float& x, const float& y) override { - /*float move_x = shape.getSize().x * x; - float move_y = shape.getSize().y * y;*/ - shape.move(x, y); } @@ -88,13 +85,7 @@ public: } void Update(const float& delta_time) override { - /*UpdateComponents(delta_time); - if (shape.getPosition().x - shape.getSize().x < 0 || shape.getPosition().x + shape.getSize().x > window_size.x) { - DestroyLater(); - } else if (shape.getPosition().y - shape.getSize().y < 0 || shape.getPosition().y + shape.getSize().y > window_size.y) { - DestroyLater(); - }*/ } void Render(sf::RenderTarget* target) override { @@ -103,7 +94,7 @@ public: }; int main(int argc, char *argv[]) { - simpleengine::Game game(500, 500, "First Example"); + simpleengine::Game game(500, 500, "SimpleEngine - Snake Example"); game.AddEvent(new simpleengine::EntityEvent(game.GetWindow(), std::make_unique(game.GetWindow()->getSize()))); return game.Run();