fixed arrow physics
This commit is contained in:
@@ -89,7 +89,7 @@ function Kupo:Smart()
|
||||
if self.bow_aim_frame > self.bow_aim_frames then
|
||||
self.bow_aim_frame = self.bow_aim_frame - self.bow_aim_frames
|
||||
self.bow_frame = self.bow_frame + 1
|
||||
Arrow:New(self.pos.x,self.pos.y,self.bow_rotation,15)
|
||||
Arrow:New(self.pos.x,self.pos.y,self.bow_rotation,10)
|
||||
end
|
||||
else
|
||||
self.bow_frame = self.bow_frame + 1
|
||||
@@ -157,12 +157,5 @@ function Kupo:HandleAnimation()
|
||||
end
|
||||
|
||||
function Kupo:DoPhysics()
|
||||
|
||||
-- horizontal collisions
|
||||
if not isThereAnyCollisionAt(self.pos.x + self.vel.x, self.pos.y) then
|
||||
self.pos.x = self.pos.x + self.vel.x
|
||||
end
|
||||
if not isThereAnyCollisionAt(self.pos.x, self.pos.y + self.vel.y) then
|
||||
self.pos.y = self.pos.y + self.vel.y
|
||||
end
|
||||
self:CollisionMove()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user