REWORKED HOW THINGS ARE SCALED
speed values should be adjusted accordingly, but maybe i slipped some i changed: player acc arrow speed i intentionally didnt change: jump speed
This commit is contained in:
@@ -129,8 +129,8 @@ function Kupo:HandleAnimation()
|
||||
DrawAnimationFrame(
|
||||
self.bow,
|
||||
math.min(self.bow_frame,self.bow_frames),
|
||||
self.pos.x + ( 8 * math.sin(self.bow_rotation)) * game.scale,
|
||||
self.pos.y + (2 - 6 * math.cos(self.bow_rotation)) * game.scale,
|
||||
self.pos.x + ( 8 * math.sin(self.bow_rotation)),
|
||||
self.pos.y + (2 - 6 * math.cos(self.bow_rotation)),
|
||||
self.bow_rotation
|
||||
)
|
||||
end
|
||||
|
||||
@@ -12,18 +12,18 @@
|
||||
y = 0
|
||||
}
|
||||
-- constants
|
||||
o.acc = 90
|
||||
o.acc = 45
|
||||
o.friction = 20
|
||||
o.gravity = 9.81
|
||||
o.climbHeight = 4
|
||||
o.jumpForce = 5
|
||||
o.maxSpeed = 600
|
||||
o.jumpMaxSpeed = 9.5
|
||||
o.jumpMaxSpeed = 9.5
|
||||
o.zeroSpeed = 0.001
|
||||
-- bools
|
||||
o.isJumping = false
|
||||
o.isOnGround = 0
|
||||
o.coyoteValue = 10
|
||||
o.coyoteValue = 5
|
||||
o.isOnLadder = false
|
||||
o.canJump = true
|
||||
o.canFall = true
|
||||
@@ -147,7 +147,7 @@ function Player:DoPhysics()
|
||||
self.vel.y = 0
|
||||
self.vel.x = 0
|
||||
|
||||
self.pos.y = self.pos.y - 4*game.scale * current_dt
|
||||
self.pos.y = self.pos.y - 4 * current_dt
|
||||
|
||||
self.canFall = false
|
||||
self.canJump = false
|
||||
@@ -159,11 +159,11 @@ function Player:DoPhysics()
|
||||
|
||||
-- checks for slopes
|
||||
for i = 1, self.climbHeight do
|
||||
if not isThereCollisionAt(self.pos.x + self.vel.x, self.pos.y - i * game.scale)
|
||||
if not isThereCollisionAt(self.pos.x + self.vel.x, self.pos.y - i)
|
||||
and self.isOnGround > 0 then
|
||||
|
||||
self.pos.x = self.pos.x + self.vel.x * 4/5
|
||||
self.pos.y = self.pos.y - i * game.scale
|
||||
self.pos.y = self.pos.y - i
|
||||
|
||||
self.canFriction = false
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user