naming convention for most stuff but not all
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
Decoration = Entity:New()
|
||||
Decoration = Entity:new()
|
||||
|
||||
function Decoration:New(x,y,animation,lightRange)
|
||||
local o = Entity:New(x,y)
|
||||
function Decoration:new(x,y,animation,light_radius)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "decoration"
|
||||
|
||||
o.pos = {x = x, y = y}
|
||||
|
||||
-- animations
|
||||
o.body = Animation:New(animation)
|
||||
o.body = Animation:new(animation)
|
||||
o:centerOffset(o.body)
|
||||
o:getBoundingBox(o.body)
|
||||
o:createBox(o.body)
|
||||
|
||||
if lightRange ~= nil then
|
||||
o.lightRange = lightRange
|
||||
o.light = Light:New(o.pos.x,o.pos.y,o.lightRange)
|
||||
if light_radius ~= nil then
|
||||
o.light_radius = light_radius
|
||||
o.light = Light:new(o.pos.x,o.pos.y,o.light_radius)
|
||||
end
|
||||
|
||||
table.insert(LoadedObjects.Entities,o)
|
||||
@@ -25,10 +25,10 @@ function Decoration:New(x,y,animation,lightRange)
|
||||
return o
|
||||
end
|
||||
|
||||
function Decoration:HandleAnimation()
|
||||
self.body:Animate()
|
||||
self:Draw(self.body)
|
||||
function Decoration:handleAnimation()
|
||||
self.body:animate()
|
||||
self:draw(self.body)
|
||||
end
|
||||
|
||||
function Decoration:DoPhysics()
|
||||
function Decoration:doPhysics()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user