aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp.bak
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities.cpp.bak')
-rw-r--r--src/entities.cpp.bak19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/entities.cpp.bak b/src/entities.cpp.bak
index e005df5..25dd379 100644
--- a/src/entities.cpp.bak
+++ b/src/entities.cpp.bak
@@ -1350,3 +1350,22 @@ void Player::sspawn(float x,float y) {
in.close();
}
}
+
+
+//NEW
+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));
+}