aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/init.lua
blob: 20ea044b9f0679d67824d063525fc702f5d3a55f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--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())

--p = comp:Position(6.5, 2.3)
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()