This is the only code I have and when ever I launch theres no unusual errors but the screens blank
var whichDirX = 0;
//MoveLeft is A
//MoveRight is D
while (ct.actions.MoveLeft.pressed && whichDirX < 1) {
whichDirX += 0.1;
}
if (whichDirX > 0 && ct.actions.MoveLeft.pressed == false) {
whichDirX -= 0.1;
}
while (ct.actions.MoveRight.pressed && whichDirX > -1) {
whichDirX -= 0.1;
}
if (whichDirX < 0 && ct.actions.MoveRight.pressed == false) {
whichDirX += 0.1;
}
this.x += 8 * ct.delta * this.whichDirX;
this.move();