naming convention for most stuff but not all
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
HookAnchor = Entity:New()
|
||||
HookAnchor = Entity:new()
|
||||
|
||||
function HookAnchor:New(x,y,hookDistance)
|
||||
local o = Entity:New(x,y)
|
||||
function HookAnchor:new(x,y,hookDistance)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "hook_anchor"
|
||||
|
||||
o.pos = {x = x, y = y}
|
||||
o.hookDistance = hookDistance or 100
|
||||
-- animations
|
||||
o.body = Animation:New(animation.fairy.flying)
|
||||
o.body = Animation:new(animation.fairy.flying)
|
||||
o:centerOffset(o.body)
|
||||
o:getBoundingBox(o.body)
|
||||
o:createBox(o.body)
|
||||
|
||||
|
||||
table.insert(LoadedObjects.Entities,o)
|
||||
@@ -21,13 +21,13 @@ function HookAnchor:New(x,y,hookDistance)
|
||||
return o
|
||||
end
|
||||
|
||||
function HookAnchor:HandleAnimation()
|
||||
self.body:Animate()
|
||||
self:Draw(self.body)
|
||||
function HookAnchor:handleAnimation()
|
||||
self.body:animate()
|
||||
self:draw(self.body)
|
||||
end
|
||||
|
||||
function HookAnchor:DrawBackground()
|
||||
Entity.DrawBackground(self)
|
||||
function HookAnchor:drawBackground()
|
||||
Entity.drawBackground(self)
|
||||
love.graphics.setColor(1,1,1,0)
|
||||
love.graphics.circle(
|
||||
"fill",
|
||||
@@ -37,10 +37,10 @@ function HookAnchor:DrawBackground()
|
||||
)
|
||||
end
|
||||
|
||||
function HookAnchor:DoPhysics()
|
||||
function HookAnchor:doPhysics()
|
||||
end
|
||||
|
||||
|
||||
function Fairy:Debug()
|
||||
Entity.Debug(self)
|
||||
function Fairy:debug()
|
||||
Entity.debug(self)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user