v0.8.0: refactored most game actions into the core module
This commit is contained in:
@@ -29,8 +29,8 @@ import com.watabou.glscripts.Script;
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
import com.watabou.glwrap.Blending;
|
||||
import com.watabou.glwrap.Vertexbuffer;
|
||||
import com.watabou.input.GameAction;
|
||||
import com.watabou.input.InputHandler;
|
||||
import com.watabou.input.KeyAction;
|
||||
import com.watabou.noosa.audio.Music;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Callback;
|
||||
@@ -100,7 +100,6 @@ public class Game implements ApplicationListener {
|
||||
Blending.useDefault();
|
||||
|
||||
inputHandler = new InputHandler( Gdx.input );
|
||||
KeyAction.initialize();
|
||||
|
||||
//refreshes texture and vertex data stored on the gpu
|
||||
TextureCache.reload();
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
package com.watabou.noosa;
|
||||
|
||||
import com.watabou.input.KeyAction;
|
||||
import com.watabou.input.GameAction;
|
||||
import com.watabou.input.KeyBindings;
|
||||
import com.watabou.input.KeyEvent;
|
||||
import com.watabou.utils.Signal;
|
||||
@@ -36,10 +36,10 @@ public class Scene extends Group {
|
||||
public boolean onSignal( KeyEvent event ) {
|
||||
if (Game.instance != null && event.pressed) {
|
||||
switch (KeyBindings.getBinding( event )) {
|
||||
case KeyAction.BACK:
|
||||
case GameAction.BACK:
|
||||
onBackPressed();
|
||||
break;
|
||||
case KeyAction.MENU:
|
||||
case GameAction.MENU:
|
||||
onMenuPressed();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
package com.watabou.noosa.ui;
|
||||
|
||||
import com.watabou.input.KeyAction;
|
||||
import com.watabou.input.GameAction;
|
||||
import com.watabou.input.KeyBindings;
|
||||
import com.watabou.input.KeyEvent;
|
||||
import com.watabou.input.PointerEvent;
|
||||
@@ -38,7 +38,7 @@ public class Button extends Component {
|
||||
protected boolean pressed;
|
||||
protected float pressTime;
|
||||
protected boolean processed;
|
||||
|
||||
|
||||
@Override
|
||||
protected void createChildren() {
|
||||
hotArea = new PointerArea( 0, 0, 0, 0 ) {
|
||||
@@ -79,7 +79,7 @@ public class Button extends Component {
|
||||
private Signal.Listener<KeyEvent> keyListener;
|
||||
|
||||
public int keyAction(){
|
||||
return KeyAction.NONE;
|
||||
return GameAction.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user