aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-31 03:17:16 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-31 03:17:16 -0400
commit7b63e52b38d131ee44eb341f22d3d39f37979507 (patch)
treef25a6ebd4aac58ed2a2c30d7ca192f276a5513dc /Scripts
parent871a882833364cf3a2b1de13fc25f610ef5d7da5 (diff)
Upon spawning, automatically call Entity Init function if it exists
Diffstat (limited to 'Scripts')
-rw-r--r--Scripts/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Scripts/init.lua b/Scripts/init.lua
index f92e366..596fe38 100644
--- a/Scripts/init.lua
+++ b/Scripts/init.lua
@@ -6,6 +6,7 @@ bird = {
Name = "bord",
Init = function(self)
print(self.Position.x .. "," .. self.Position.y)
+ print("Bird spawn")
end
}
@@ -38,10 +39,9 @@ animal = {
}
birdSpawn = game.spawn(bird);
-birdSpawn:Init()
dogSpawn = game.spawn(dog);
-dogSpawn:Init()
dogSpawn.Position.x = 37.5
animalSpawn = game.spawn(animal);
+print("Animal pos: " .. animalSpawn.Position.x)