html5 게임에 대한 액터 클래스를 만들려고했지만 Uncaught SyntaxError가 발생합니다. 그것이 의미하는 것이나 그것을 고치는 법을 전혀 모릅니다. 이와 같은 다른 질문은 대개 Jquery에 관한 것이므로 내 문제에 맞는 솔루션을 찾을 수 없습니다.잡히지 않은 SyntaxError : 예기치 않은 토큰이 Javasctript 오류
function Actor(x, y){
//...
this.direction = 270;
//...
}
Actor.prototype.update = function(){
if(this.speed >= this.maxspeed)
this.speed = this.maxspeed;
if(Key.isDown(Key.getCode("a")) this.direction -= 1; // < -- ERROR OCCURS HERE
if(Key.isDown(Key.getCode("d")) this.direction +=1;
if(Key.isDown(Key.getCode(" ") this.move();
}