adesso volevo provare ad fare una cosa del genere:
gamelib.input.mouse.ismove
il codice è questo:
Codice: Seleziona tutto
/* Input */
this.input =
{
keyDown : function(event)
{
window.addEventListener('keydown', event, false);
},
keyUp : function(event)
{
window.addEventListener('keyup', event, false);
},
this.mouse = {
isMove: function(event)
{
game.addEventListener('mousemove', event, false);
},
isClick: function(event)
{
game.addEventListener('click', event, false);
}
};
};
Uncaught SyntaxError: Unexpected token .
dove sta:
this.mouse
cosa devo fare?
grazie mille.
buona settimana.