diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-08-28 23:45:35 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-08-28 23:45:35 -0400 |
commit | 41addc2d6b600e9cade63884de1c13dba662dc31 (patch) | |
tree | e7aa56cfc2f043cf99f25a337900bf17ab30e537 /Scripts/init.lua | |
parent | 85fb2bff38b2ef6cb17e86c5f602ee09a365b117 (diff) |
Can now create entities using Lua scripting
Diffstat (limited to 'Scripts/init.lua')
-rw-r--r-- | Scripts/init.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Scripts/init.lua b/Scripts/init.lua index 4dfb3b9..20ea044 100644 --- a/Scripts/init.lua +++ b/Scripts/init.lua @@ -13,3 +13,16 @@ local q = comp.Position(6, 3) print(q.x .. "," .. q.y) print("HEY") + +bird = { + Position = { + x = 1.2, + y = 3.4 + }, + init = function(self) + print(self.Position.x .. "," .. self.Position.y) + end +} + +birdSpawn = game.spawn(bird); +birdSpawn:init() |