naming convention for most stuff but not all

This commit is contained in:
lustlion
2022-03-04 23:28:30 +01:00
parent c978855711
commit cef2096577
29 changed files with 354 additions and 436 deletions

View File

@@ -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