turn left and right

main
koehr 6 years ago
parent 76f6f2f9d5
commit 45c42ee210

@ -89,6 +89,9 @@ export default {
let vx = this.player_velocity_x * RECIPROCAL
let vy = this.player_velocity_y * RECIPROCAL
if (vx < 0) this.player_direction = 'left'
if (vx > 0) this.player_direction = 'right'
if (vx > 0 && this.blockedRight) vx = 0
if (vx < 0 && this.blockedLeft) vx = 0
if (vy > 0 && this.blockedDown) vy = 0

Loading…
Cancel
Save