1 decade ago by denniss
I am following the book "HTML5 Game Development" and I am at the point where I am supposed to make my character move. When I put my character on a non-collision tile, I can&
039;t seem to move the character even after I put some logging inside my #update
function.update:function () { var accel = this.standing ? this.accelGround : this.accelAir; if (ig.input.state('left')) { this.accel.x = -accel; this.flip = true; } else if (ig.input.state('right')) { this.accel.x = accel; this.flip = false; } else { this.accel.x = 0; } //jump if (this.standing && ig.input.pressed('jump')) { this.vel.y = -this.jump; } this.parent(); },