Created
October 10, 2020 12:03
-
-
Save MCarlomagno/31efbf17c398d24b230c6ac27221bf76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dispatchAction = function (action) { | |
var pressed = {}, | |
self = this, | |
f1 = mk.game.fighters[0], | |
f2 = mk.game.fighters[1]; | |
// where pressed is a map of type <keyboard_code, boolean> | |
pressed[keyCode] = true; | |
var move = self._getMove(pressed, mk.controllers.keys.p1, 0); | |
self._moveFighter(f1, move); | |
move = self._getMove(pressed, mk.controllers.keys.p2, 1); | |
self._moveFighter(f2, move); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment