aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-10-20 09:01:28 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-10-20 09:01:28 -0400
commita7ec2350f406195b119e24a81c95649c3645a26b (patch)
treeb99ac8d8bef516f1d90b9cdb9a21634da0801e41 /src/entities.cpp
parentdbed8f40b0c85a1d550d9c2557d57b192fc097ab (diff)
oh yeah that
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
new file mode 100644
index 0000000..d07de4b
--- /dev/null
+++ b/src/entities.cpp
@@ -0,0 +1,21 @@
+#include <entities.hpp>
+
+#include <engine.hpp>
+#include <components.hpp>
+
+void entityxTest(void)
+{
+ entityx::Entity e = game::entities.create();
+ e.assign<Position>(100.0f, 100.0f);
+ e.assign<Direction>(0.0f, 0.0f);
+
+ e = game::entities.create();
+ e.assign<Position>(0.0f, 100.0f);
+ e.assign<Direction>(-0.01f, 0.0f);
+ e.assign<Visible>(-.2f);
+ auto sprite_h = e.assign<Sprite>();
+ sprite_h->addSpriteSegment(SpriteData(game::sprite_l.loadSprite("assets/cat.png"),
+ vec2(0, 0),
+ vec2(19, 15)),
+ vec2(0, 0));
+}