chore: group events

This commit is contained in:
cha0s 2019-04-14 13:28:41 -05:00
parent 9fd3183073
commit 5ab0c1fbe4

View File

@ -21,10 +21,6 @@ import Ui from './ui';
import DebugUi from './ui/debug';
// DOM.
const appNode = document.querySelector('.app');
// Lol Apple
appNode.addEventListener('touchmove', (event) => {
event.preventDefault();
});
// Graphics stage.
const visibleSize = [320, 180];
const visibleScale = [2, 2];
@ -98,6 +94,10 @@ actionRegistry.mapKeysToActions({
'd': 'MoveRight',
});
actionRegistry.listen(stage.element);
// Lol Apple
appNode.addEventListener('touchmove', (event) => {
event.preventDefault();
});
// Mouse/touch movement.
function createMoveToNormal(position) {
if (!selfEntity) {