From f2411141e364766b1294f1b3d9e1a307b9de0c24 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sun, 1 Sep 2019 01:25:14 -0400 Subject: Game loop now updates position every tick, and added circular movement to dog --- src/components/Position.hpp | 4 ++-- src/components/Render.hpp | 6 +++--- src/components/Velocity.hpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/components') diff --git a/src/components/Position.hpp b/src/components/Position.hpp index 0462d1a..8a6bd74 100644 --- a/src/components/Position.hpp +++ b/src/components/Position.hpp @@ -24,8 +24,8 @@ struct Position : Component, entityx::Component { public: - float x, y; - Position(float _x, float _y): x(_x), y(_y) {} + double x, y; + Position(double _x, double _y): x(_x), y(_y) {} Position(void): x(0), y(0) {} Position FromLua(sol::object ref) diff --git a/src/components/Render.hpp b/src/components/Render.hpp index 4444fef..5a9b1a4 100644 --- a/src/components/Render.hpp +++ b/src/components/Render.hpp @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#ifndef RENDER_HPP_ -#define RENDER_HPP_ +#ifndef RENDERC_HPP_ +#define RENDERC_HPP_ #include @@ -49,4 +49,4 @@ struct Render : Component, entityx::Component }; -#endif//RENDER_HPP_ +#endif//RENDERC_HPP_ diff --git a/src/components/Velocity.hpp b/src/components/Velocity.hpp index eacadf2..c2b85e8 100644 --- a/src/components/Velocity.hpp +++ b/src/components/Velocity.hpp @@ -25,9 +25,9 @@ struct Velocity : Component, entityx::Component { public: - float x, y; + double x, y; Velocity(): x(0), y(0) {} - Velocity(float _x, float _y): x(_x), y(_y) {} + Velocity(double _x, double _y): x(_x), y(_y) {} Velocity FromLua(sol::object ref) { -- cgit v1.2.3