mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Gjenoppretter elementer fjernet under opprydding
This commit is contained in:
parent
620625f31f
commit
c8179b8e27
@ -42,6 +42,8 @@ public class GameLauncher extends ApplicationAdapter {
|
|||||||
camera.setToOrtho(false, game.getWidth() * tileDimensions,
|
camera.setToOrtho(false, game.getWidth() * tileDimensions,
|
||||||
game.getHeight() * tileDimensions);
|
game.getHeight() * tileDimensions);
|
||||||
batch = new SpriteBatch();
|
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());
|
object.flipX(), object.flipY());
|
||||||
}
|
}
|
||||||
batch.end();
|
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;
|
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;
|
cameraZoom += 0.1;
|
||||||
}
|
}
|
||||||
if (Gdx.input.isKeyJustPressed(Input.Keys.RIGHT)) {
|
if (Gdx.input.isKeyJustPressed(Input.Keys.RIGHT)) {
|
||||||
@ -84,4 +86,15 @@ public class GameLauncher extends ApplicationAdapter {
|
|||||||
textureSheet.dispose();
|
textureSheet.dispose();
|
||||||
batch.dispose();
|
batch.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*public static class MyTextInputListener implements Input.TextInputListener {
|
||||||
|
@Override
|
||||||
|
public void input (String text) {
|
||||||
|
System.out.println(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void canceled () {
|
||||||
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
@ -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
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user