Increase player movement speed
This commit is contained in:
parent
e32a821c6a
commit
d98203af2f
1 changed files with 3 additions and 3 deletions
|
@ -16,10 +16,10 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
playerVelocity = 60.0
|
||||
playerVelocity = 120.0
|
||||
playerGroundAccelTime = 0.1
|
||||
playerGroundAccel = playerVelocity / playerGroundAccelTime
|
||||
playerAirAccelTime = 0.25
|
||||
playerAirAccelTime = 0.5
|
||||
playerAirAccel = playerVelocity / playerAirAccelTime
|
||||
fallVelocity = 900.0
|
||||
)
|
||||
|
@ -95,7 +95,7 @@ func playerUpdateVelocity(body *cp.Body, gravity cp.Vector, damping, dt float64)
|
|||
|
||||
xDir := 0.0
|
||||
yDir := 0.0
|
||||
if ebiten.IsKeyPressed(ebiten.KeyW) {
|
||||
if ebiten.IsKeyPressed(ebiten.KeyW) && world.PlayerGrounded {
|
||||
yDir -= 1
|
||||
world.LastWalkDirU = true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue