[camera] More consistent naming

This commit is contained in:
vrld 2015-10-13 15:35:46 +02:00
parent 2257ab025c
commit 523502ca80

View File

@ -78,7 +78,7 @@ function camera:move(dx,dy)
return self return self
end end
function camera:pos() function camera:position()
return self.x, self.y return self.x, self.y
end end
@ -139,7 +139,7 @@ function camera:worldCoords(x,y)
return x+self.x, y+self.y return x+self.x, y+self.y
end end
function camera:mousePos() function camera:mousePosition()
return self:worldCoords(love.mouse.getPosition()) return self:worldCoords(love.mouse.getPosition())
end end
@ -162,7 +162,7 @@ function camera:lockY(y, smoother, ...)
return self return self
end end
function camera:lockPos(x,y, smoother, ...) function camera:lockPosition(x,y, smoother, ...)
return self:move((smoother or self.smoother)(x - self.x, y - self.y, ...)) return self:move((smoother or self.smoother)(x - self.x, y - self.y, ...))
end end