aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/init.lua
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-27 00:24:05 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-27 00:24:05 -0400
commit787393dd86d6c37b5680847dd4eef14406a86687 (patch)
tree942e0155c484d6f41bb8f8f25e67c53d30dbeb2e /Scripts/init.lua
parent6acad98c1dba2c07045ae724da1f833ee8369d47 (diff)
Created basic init script
Diffstat (limited to 'Scripts/init.lua')
-rw-r--r--Scripts/init.lua11
1 files changed, 11 insertions, 0 deletions
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")