I am trying to make a 2.5D game inspired by Drew Conley from youtube but whenever I try to include this JS file this problem shows up and I cant figure out what it means. any help would be appriciated Picture in Link Code Error from Console
class NPC extends GameObject{
constructor(config){
super(config);
this.movingProgressRemaining = 32;
this.directionUpdate = {
"up:": ["y", -1],
"down:": ["y", 1],
"left:": ["x", -1],
"right:": ["x", 1],
}
}
update(state) {
this.updateposition();
}
updateposition(){
if (this.movingProgressRemaining > 0){
const[property, change] = this.directionUpdate[this.direction];
this[property] += change;
this.movingProgressRemaining -= 1;
}
}
}
Thanks to Barmar the problem was i had written a : in my directionUpdates