mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
[camera] More consistent naming
This commit is contained in:
parent
2257ab025c
commit
523502ca80
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user