From 787393dd86d6c37b5680847dd4eef14406a86687 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Tue, 27 Aug 2019 00:24:05 -0400 Subject: Created basic init script --- Scripts/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Scripts/init.lua (limited to 'Scripts/init.lua') diff --git a/Scripts/init.lua b/Scripts/init.lua new file mode 100644 index 0000000..ded10ec --- /dev/null +++ b/Scripts/init.lua @@ -0,0 +1,11 @@ +Player = entityx.manager:new() +function Player:init(o) + o = o or {} + self.position = self:component("Position", o.position or {0, 0}) +end + +p = Player:instance({position = {10, 20}}) +p.position.x(5) +print(p.position.x(), p.position.y()) + +print("HEY") -- cgit v1.2.3