Gjenoppretter elementer fjernet under opprydding

This commit is contained in:
Kristian Knarvik 2020-02-26 09:17:06 +01:00
parent 620625f31f
commit c8179b8e27
3 changed files with 49 additions and 2 deletions

View File

@ -42,6 +42,8 @@ public class GameLauncher extends ApplicationAdapter {
camera.setToOrtho(false, game.getWidth() * tileDimensions,
game.getHeight() * tileDimensions);
batch = new SpriteBatch();
/*MyTextInputListener listener = new MyTextInputListener();
Gdx.input.getTextInput(listener, "Input name", "", "Name");*/
}
/**
@ -67,10 +69,10 @@ public class GameLauncher extends ApplicationAdapter {
object.flipX(), object.flipY());
}
batch.end();
if (Gdx.input.isKeyPressed(Input.Keys.CONTROL_LEFT) && Gdx.input.isKeyPressed(Input.Keys.PLUS) && cameraZoom > 0) {
if (Gdx.input.isKeyJustPressed(Input.Keys.CONTROL_LEFT) && Gdx.input.isKeyJustPressed(Input.Keys.PLUS) && cameraZoom > 0) {
cameraZoom -= 0.1;
}
if (Gdx.input.isKeyPressed(Input.Keys.CONTROL_LEFT) && Gdx.input.isKeyPressed(Input.Keys.MINUS) && cameraZoom < 2) {
if (Gdx.input.isKeyJustPressed(Input.Keys.CONTROL_LEFT) && Gdx.input.isKeyJustPressed(Input.Keys.MINUS) && cameraZoom < 2) {
cameraZoom += 0.1;
}
if (Gdx.input.isKeyJustPressed(Input.Keys.RIGHT)) {
@ -84,4 +86,15 @@ public class GameLauncher extends ApplicationAdapter {
textureSheet.dispose();
batch.dispose();
}
/*public static class MyTextInputListener implements Input.TextInputListener {
@Override
public void input (String text) {
System.out.println(text);
}
@Override
public void canceled () {
}
}*/
}

View File

@ -0,0 +1,14 @@
package inf112.fiasko.roborally.element_properties;
/**
* This enum represents an action on a programming card
*/
public enum Action {
ROTATE_RIGHT,
ROTATE_LEFT,
U_TURN,
MOVE_1,
MOVE_2,
MOVE_3,
BACK_UP
}

View File

@ -0,0 +1,20 @@
package inf112.fiasko.roborally.objects;
/**
* This Interface describes a card without a card suit
* @param <S> The value type
* @param <T> The symbol type
*/
public interface ICardWithoutSuit<S,T> {
/**
* Gets the value of the card
* @return The card value
*/
S getValue();
/**
* Gets the symbol of the card
* @return The card symbol
*/
T getSymbol();
}