v0.8.0: refactored KeyAction into int constants so it can be expanded

This commit is contained in:
Evan Debenham
2019-12-13 23:22:44 -05:00
parent cb76fb8188
commit f269d68a27
15 changed files with 176 additions and 114 deletions

View File

@@ -21,6 +21,7 @@
package com.watabou.noosa;
import com.watabou.input.KeyAction;
import com.watabou.input.KeyBindings;
import com.watabou.input.KeyEvent;
import com.watabou.utils.Signal;
@@ -35,10 +36,10 @@ public class Scene extends Group {
public boolean onSignal( KeyEvent event ) {
if (Game.instance != null && event.pressed) {
switch (KeyBindings.getBinding( event )) {
case BACK:
case KeyAction.BACK:
onBackPressed();
break;
case MENU:
case KeyAction.MENU:
onMenuPressed();
break;
}