dimanche 11 février 2018

Ember direction dont work

I have a function

movePacMan: function (direction, amount) {
    this.incrementProperty(direction, amount);
    this.clearScreen();
    this.drawCircle();
},

But when i need to use it, it doesn't work

`keyboardShortcuts: {
    up: function() {this.movePacMan('y', -1 * this.get('sizeSquare'));},
//doesn't work
    down: function() {this.movePacMan('y', this.get('sizeSquare'));},
//works
    left: function() {this.movePacMan('x', -1 * this.get('sizeSquare'));},
//doesn't work
    right: function() {this.movePacMan('x', this.get('sizeSquare'));},
//works
},`

Can anyone help me to fix this? I have no idea how to fix it correctly

P.S.: New to ember, sorry




Aucun commentaire:

Enregistrer un commentaire