aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/init.lua
diff options
context:
space:
mode:
authorAndy <drumsetmonkey@gmail.com>2019-08-29 13:07:45 -0400
committerAndy <drumsetmonkey@gmail.com>2019-08-29 13:07:45 -0400
commit4ac4b280abf2ffa28caa5a532353115a3033444f (patch)
tree2a13d658bb454360b2faf401244bb0321d3460d4 /Scripts/init.lua
parente9758416b18b27a65337c28d9641afc0ee89b34b (diff)
parent7a46fa2dd3dad3f038bf8e7339bc67abca428ae6 (diff)
Started creating scripting library/namespace and added sol2 for interfacing
Diffstat (limited to 'Scripts/init.lua')
-rw-r--r--Scripts/init.lua57
1 files changed, 31 insertions, 26 deletions
diff --git a/Scripts/init.lua b/Scripts/init.lua
index 5b0f915..30cc50f 100644
--- a/Scripts/init.lua
+++ b/Scripts/init.lua
@@ -9,34 +9,39 @@
--print(p.position.x(), p.position.y())
--p = comp:Position(6.5, 2.3)
-local q = comp.Position(6, 3)
+local q = Position.new(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
-}
+local g = game.testfunc({});
+print(g.Position.x .. "," .. g.Position.y);
+g.Position.x = 5.4;
+g.Position.y = 1.2;
-dog = {
- Position = {
- x = 6.5,
- y = 1.3
- },
- init = function(self)
- print(self.Position.x .. "," .. self.Position.y)
- end
-}
-
-birdSpawn = game.spawn(bird);
-birdSpawn:init()
-
-dogSpawn = game.spawn(dog);
-dogSpawn:init()
-dogSpawn.Position.x = 37.5
+--bird = {
+-- Position = {
+-- x = 1.2,
+-- y = 3.4
+-- },
+-- init = function(self)
+-- print(self.Position.x .. "," .. self.Position.y)
+-- end
+--}
+--
+--dog = {
+-- Position = {
+-- x = 6.5,
+-- y = 1.3
+-- },
+-- init = function(self)
+-- print(self.Position.x .. "," .. self.Position.y)
+-- end
+--}
+--
+--birdSpawn = game.spawn(bird);
+--birdSpawn:init()
+--
+--dogSpawn = game.spawn(dog);
+--dogSpawn:init()
+--dogSpawn.Position.x = 37.5