mirror of
https://github.com/vrld/HC.git
synced 2024-11-18 12:54:23 +00:00
Merge branch 'master' of github.com:vrld/HardonCollider
This commit is contained in:
commit
fae80f07a0
@ -57,6 +57,11 @@ end
|
|||||||
local Shape = Class{name = 'Shape', function(self, t)
|
local Shape = Class{name = 'Shape', function(self, t)
|
||||||
self._type = t
|
self._type = t
|
||||||
end}
|
end}
|
||||||
|
function Shape:moveTo(x,y)
|
||||||
|
local current = vector( self:center() )
|
||||||
|
local to = vector.isvector(x) and x or vector(x,y)
|
||||||
|
self:move( to-current )
|
||||||
|
end
|
||||||
|
|
||||||
function Shape:moveTo(x,y)
|
function Shape:moveTo(x,y)
|
||||||
if y then x = vector(x,y) end
|
if y then x = vector(x,y) end
|
||||||
|
Loading…
Reference in New Issue
Block a user