Hi,
I am working on a game in which multiple keys can be pressed at once.
Like FORWARD+UP to aim in corner and along with it FIRE+JUMP
But i am not getting event for the third and the fourth key press.
I have registered key event with this code
cc.eventManager.addListener({
event: cc.EventListener.KEYBOARD,
onKeyPressed: function (keyCode, event) {
event.getCurrentTarget().keyEvent(true, keyCode);
},
onKeyReleased: function (keyCode, event) {
event.getCurrentTarget().keyEvent(false, keyCode);
}
}, this);
Any idea how to implement this?