You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
32 lines
1.0 KiB
package sig.engine;
|
|
|
|
import java.awt.event.KeyEvent;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
|
|
import net.java.games.input.Component;
|
|
|
|
public enum Action {
|
|
MOVE_RIGHT(new Key(KeyEvent.VK_RIGHT),new Key(KeyEvent.VK_D)),
|
|
MOVE_LEFT(new Key(KeyEvent.VK_LEFT),new Key(KeyEvent.VK_A)),
|
|
JUMP(new Key(KeyEvent.VK_SPACE),new Key(KeyEvent.VK_W)),
|
|
FALL(new Key(KeyEvent.VK_DOWN),new Key(KeyEvent.VK_S)),
|
|
SLIDE(new Key(KeyEvent.VK_CONTROL)),
|
|
LEVEL_EDITOR(new Key(KeyEvent.VK_F2)),
|
|
PLAY_GAME(new Key(KeyEvent.VK_F1)),
|
|
EDITOR_SET_VIEW(new Key(KeyEvent.VK_F3)),
|
|
EDITOR_SET_TYPE(new Key(KeyEvent.VK_F4)),
|
|
EDITOR_SET_BACKGROUND(new Key(KeyEvent.VK_F5)),;
|
|
|
|
float val;
|
|
Key controllingKey;
|
|
|
|
Action(Component...components) {
|
|
KeyBind.KEYBINDS.put(this,new ArrayList<>(Arrays.asList(components)));
|
|
}
|
|
Action(Component axis,float val) {
|
|
ArrayList<Component> comps = new ArrayList<Component>();
|
|
comps.add(axis);
|
|
KeyBind.KEYBINDS.put(this,comps);
|
|
}
|
|
}
|
|
|