|
|
@ -7,26 +7,26 @@ import java.util.Arrays; |
|
|
|
import net.java.games.input.Component; |
|
|
|
import net.java.games.input.Component; |
|
|
|
|
|
|
|
|
|
|
|
public enum Action { |
|
|
|
public enum Action { |
|
|
|
MOVE_RIGHT(new Key(KeyEvent.VK_RIGHT),new Key(KeyEvent.VK_D)), |
|
|
|
MOVE_RIGHT(new KeyBind(KeyEvent.VK_RIGHT),new KeyBind(KeyEvent.VK_D)), |
|
|
|
MOVE_LEFT(new Key(KeyEvent.VK_LEFT),new Key(KeyEvent.VK_A)), |
|
|
|
MOVE_LEFT(new KeyBind(KeyEvent.VK_LEFT),new KeyBind(KeyEvent.VK_A)), |
|
|
|
JUMP(new Key(KeyEvent.VK_SPACE),new Key(KeyEvent.VK_W)), |
|
|
|
JUMP(new KeyBind(KeyEvent.VK_SPACE),new KeyBind(KeyEvent.VK_W)), |
|
|
|
FALL(new Key(KeyEvent.VK_DOWN),new Key(KeyEvent.VK_S)), |
|
|
|
FALL(new KeyBind(KeyEvent.VK_DOWN),new KeyBind(KeyEvent.VK_S)), |
|
|
|
SLIDE(new Key(KeyEvent.VK_CONTROL)), |
|
|
|
SLIDE(new KeyBind(KeyEvent.VK_CONTROL)), |
|
|
|
LEVEL_EDITOR(new Key(KeyEvent.VK_F2)), |
|
|
|
LEVEL_EDITOR(new KeyBind(KeyEvent.VK_F2)), |
|
|
|
PLAY_GAME(new Key(KeyEvent.VK_F1)), |
|
|
|
PLAY_GAME(new KeyBind(KeyEvent.VK_F1)), |
|
|
|
EDITOR_SET_VIEW(new Key(KeyEvent.VK_F3)), |
|
|
|
EDITOR_SET_VIEW(new KeyBind(KeyEvent.VK_F3)), |
|
|
|
EDITOR_SET_TYPE(new Key(KeyEvent.VK_F4)), |
|
|
|
EDITOR_SET_TYPE(new KeyBind(KeyEvent.VK_F4)), |
|
|
|
EDITOR_SET_BACKGROUND(new Key(KeyEvent.VK_F5)),; |
|
|
|
EDITOR_SET_BACKGROUND(new KeyBind(KeyEvent.VK_F5)),; |
|
|
|
|
|
|
|
|
|
|
|
float val; |
|
|
|
float val; |
|
|
|
Key controllingKey; |
|
|
|
Key controllingKey; |
|
|
|
|
|
|
|
|
|
|
|
Action(Component...components) { |
|
|
|
Action(KeyBind...keybinds) { |
|
|
|
KeyBind.KEYBINDS.put(this,new ArrayList<>(Arrays.asList(components))); |
|
|
|
KeyBind.KEYBINDS.put(this,new ArrayList<>(Arrays.asList(keybinds))); |
|
|
|
} |
|
|
|
} |
|
|
|
Action(Component axis,float val) { |
|
|
|
Action(Component axis,float val) { |
|
|
|
ArrayList<Component> comps = new ArrayList<Component>(); |
|
|
|
ArrayList<KeyBind> comps = new ArrayList<KeyBind>(); |
|
|
|
comps.add(axis); |
|
|
|
comps.add(new KeyBind(axis,val)); |
|
|
|
KeyBind.KEYBINDS.put(this,comps); |
|
|
|
KeyBind.KEYBINDS.put(this,comps); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|