naming convention for most stuff but not all
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Arrow = Entity:New()
|
||||
Arrow = Entity:new()
|
||||
|
||||
function Arrow:New(x,y,rotation,speed)
|
||||
local o = Entity:New(x,y)
|
||||
function Arrow:new(x,y,rotation,speed)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "arrow"
|
||||
|
||||
@@ -17,9 +17,9 @@ function Arrow:New(x,y,rotation,speed)
|
||||
o.illuminated = true
|
||||
|
||||
-- animations
|
||||
o.body = Animation:New(animation.kupo.arrow)
|
||||
o.body = Animation:new(animation.kupo.arrow)
|
||||
|
||||
o.boxCollision = {
|
||||
o.box = {
|
||||
from = {x = -0.5, y = -0.5}, --gameworld pixels
|
||||
to = {x = 0.5, y = 0.5} -- gameworld pixels
|
||||
}
|
||||
@@ -32,11 +32,11 @@ function Arrow:New(x,y,rotation,speed)
|
||||
return o
|
||||
end
|
||||
|
||||
function Arrow:DrawBackground()
|
||||
self:Draw(self.body)
|
||||
function Arrow:drawBackground()
|
||||
self:draw(self.body)
|
||||
end
|
||||
|
||||
function Arrow:DoPhysics()
|
||||
function Arrow:doPhysics()
|
||||
if not self:isCollidingAt(self.pos.x + self.vel.x, self.pos.y, LoadedObjects.Collisions) then
|
||||
self.pos.x = self.pos.x + self.vel.x
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user