untweak
This commit is contained in:
parent
9a3da85999
commit
eed4909fb7
1 changed files with 2 additions and 2 deletions
|
@ -122,8 +122,8 @@ func (aw *Awakeman) realUpdate() error {
|
||||||
if inpututil.IsKeyJustPressed(ebiten.KeySpace) || inpututil.IsKeyJustPressed(ebiten.KeyZ) {
|
if inpututil.IsKeyJustPressed(ebiten.KeySpace) || inpututil.IsKeyJustPressed(ebiten.KeyZ) {
|
||||||
// On ground or recently on ground?
|
// On ground or recently on ground?
|
||||||
if aw.coyoteTimer > 0 {
|
if aw.coyoteTimer > 0 {
|
||||||
// Jump. One frame of a = jumpVelocity (ignoring any gravity already applied this tick).
|
// Jump. One frame of v = jumpVelocity (ignoring any gravity already applied this tick).
|
||||||
aw.vy += jumpVelocity
|
aw.vy = jumpVelocity
|
||||||
} else {
|
} else {
|
||||||
// Buffer the jump in case aw hits the ground soon.
|
// Buffer the jump in case aw hits the ground soon.
|
||||||
aw.jumpBuffer = jumpBufferTime
|
aw.jumpBuffer = jumpBufferTime
|
||||||
|
|
Loading…
Reference in a new issue