fixed all entities instanced an entity when grabbing functions from parent Entity. now it just sets metatable
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
Kupo = Entity:new()
|
||||
Kupo = {}
|
||||
Kupo.type = "Kupo"
|
||||
Kupo.supertype = Entity.type
|
||||
Kupo.display = Animation:new(animation.kupo.body)
|
||||
setmetatable(Kupo, Entity)
|
||||
|
||||
function Kupo:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
@@ -27,8 +29,13 @@ function Kupo:new(x,y)
|
||||
o.bow_aim_frames = 8
|
||||
o.hostile = true
|
||||
|
||||
o.light_radius = o.range/2
|
||||
o.light = Light:new(o.pos.x,o.pos.y,o.light_radius)
|
||||
-- light values
|
||||
local light_data = {}
|
||||
light_data.radius = 100
|
||||
light_data.shine_radius = 20
|
||||
light_data.flicker = nil
|
||||
light_data.color = nil
|
||||
o.light = Light:new(o.pos.x,o.pos.y,light_data)
|
||||
|
||||
o:id()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user