25
25
maxVelocity = {x=velLimit,y=velLimit},
26
26
minVelocity = {x=-velLimit, y=-velLimit},
28
27
onStartFrame = function(self)
29
28
--local dx = love.mouse.getX() - self.x
30
29
--local dy = love.mouse.getY() - self.y
35
34
self.acceleration.x = dx * 2
36
35
self.acceleration.y = dy * 2
52
37
onUpdate = function(self)
53
38
self.rotation = math.atan2(self.velocity.y, self.velocity.x)