diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/GameMode.java b/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/GameMode.java new file mode 100644 index 0000000000000000000000000000000000000000..1979fc24fa3fbaf955b93b4b53942edfd080080c --- /dev/null +++ b/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/GameMode.java @@ -0,0 +1,6 @@ +package de.hdm_stuttgart.battlearena.Controller.Enum; + +public enum GameMode { + LOCAL, + NETWORK +} \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/GameState.java b/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/GameState.java new file mode 100644 index 0000000000000000000000000000000000000000..1ea713b41a90fa593348760d6a6be8c9f0ed1a62 --- /dev/null +++ b/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/GameState.java @@ -0,0 +1,9 @@ +package de.hdm_stuttgart.battlearena.Controller.Enum; + +public enum GameState { + MENU, + PAUSE, + PLAYING, + LOST, + WON +} \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/PlayerMode.java b/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/PlayerMode.java new file mode 100644 index 0000000000000000000000000000000000000000..fb864e26dcdce0777bc7301cfeb51007063ba46f --- /dev/null +++ b/src/main/java/de/hdm_stuttgart/battlearena/Controller/Enum/PlayerMode.java @@ -0,0 +1,6 @@ +package de.hdm_stuttgart.battlearena.Controller.Enum; + +public enum PlayerMode { + PLAYER_ONE, + PLAYER_TWO +} \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Controller/GameSceneController.java b/src/main/java/de/hdm_stuttgart/battlearena/Controller/GameSceneController.java index 2d90bb00e2c3503261084d7acf6b1dfd98593c61..dc9b88e85c746bab7c651e5a6baae246eb4b94c4 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Controller/GameSceneController.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Controller/GameSceneController.java @@ -1,5 +1,9 @@ package de.hdm_stuttgart.battlearena.Controller; +import de.hdm_stuttgart.battlearena.Controller.Enum.GameMode; +import de.hdm_stuttgart.battlearena.Controller.Enum.GameState; +import de.hdm_stuttgart.battlearena.Controller.Enum.PlayerMode; +import de.hdm_stuttgart.battlearena.Model.DataStorage.Classes.RuntimeInfo; import de.hdm_stuttgart.battlearena.Model.Entity.EntityClass; import de.hdm_stuttgart.battlearena.Model.Entity.EntityFactory; import de.hdm_stuttgart.battlearena.Model.Entity.EntityType; @@ -30,11 +34,15 @@ public class GameSceneController implements Initializable { InputHandler inputHandler = InputHandler.getInstance(); + RuntimeInfo runtimeInfo = RuntimeInfo.getInstance(); + + GameMode gameMode = runtimeInfo.getGameMode(); + IEntity player; IEntity enemy; - EntityClass playerClass = EntityClass.HUMAN; - EntityClass enemyClass = EntityClass.HUMAN; + EntityClass playerOneClass = runtimeInfo.getPlayerOneClass(); + EntityClass playerTwoClass = runtimeInfo.getPlayerTwoClass(); TileManager tileManager; @@ -46,7 +54,7 @@ public class GameSceneController implements Initializable { "4 1 1 1 2 2 4 1 1 1 1 1 1 1 3 1 2 3 " + "4 1 1 1 2 2 4 1 3 3 3 1 1 1 3 2 2 3 " + "4 1 1 1 2 2 4 1 1 1 1 1 1 1 3 2 1 3 " + - "4 1 1 1 2 2 4 3 3 1 4 3 3 3 3 2 1 3 " + + "4 1 5 1 2 2 4 3 3 1 4 3 3 3 3 2 1 3 " + "4 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 1 3 " + "4 1 1 1 2 2 4 3 3 1 3 3 3 3 3 2 1 3 " + "4 1 1 1 1 2 4 3 3 1 3 3 3 3 3 1 1 3 " + @@ -59,7 +67,7 @@ public class GameSceneController implements Initializable { "4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3"; int horizontalTileCount = 18; int verticalTileCount = 18; - int diffTileCount = 5; + int diffTileCount = 6; int scaledTileSize = 48; @@ -68,11 +76,20 @@ public class GameSceneController implements Initializable { graphicsContext2D = canvas2D.getGraphicsContext2D(); graphicsContext2D.setImageSmoothing(false); - player = EntityFactory.createEntity(EntityType.PLAYER, graphicsContext2D, inputHandler, playerClass, this); - enemy = EntityFactory.createEntity(EntityType.ENEMY_PLAYER, graphicsContext2D, inputHandler, enemyClass, this); + player = EntityFactory.createEntity(EntityType.PLAYER, graphicsContext2D, inputHandler, + playerOneClass, this, PlayerMode.PLAYER_ONE); + if (gameMode == GameMode.NETWORK) { + enemy = EntityFactory.createEntity(EntityType.NETWORK_PLAYER_TWO, graphicsContext2D, inputHandler, + playerTwoClass, this, PlayerMode.PLAYER_TWO); + } else { + enemy = EntityFactory.createEntity(EntityType.PLAYER, graphicsContext2D, inputHandler, + playerTwoClass, this, PlayerMode.PLAYER_TWO); + } tileManager = new TileManager(graphicsContext2D, diffTileCount, horizontalTileCount, verticalTileCount, mapString); + runtimeInfo.setGameState(GameState.PLAYING); + AnimationTimer gameLoop = new AnimationTimer() { @Override public void handle(long l) { @@ -89,18 +106,25 @@ public class GameSceneController implements Initializable { player.updateEntityMovement(this); enemy.updateEntityMovement(this); player.attack(enemy, graphicsContext2D); + enemy.attack(player, graphicsContext2D); } private void renderContent(GraphicsContext graphicsContext) { tileManager.renderMap(); player.renderEntity(graphicsContext); enemy.renderEntity(graphicsContext); + player.checkHealTile(player, graphicsContext2D); + enemy.checkHealTile(enemy, graphicsContext2D); } public IEntity getEnemy() { return enemy; } + public IEntity getPlayer() { + return player; + } + public TileManager getTileManager() { return tileManager; } diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/DataStorage/Classes/RuntimeInfo.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/DataStorage/Classes/RuntimeInfo.java index 12c229b24a282a87678b4831f74e0177b3ab6131..c1d4f74649b252ee397dd132ac0d9f850a37aa85 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/DataStorage/Classes/RuntimeInfo.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/DataStorage/Classes/RuntimeInfo.java @@ -1,8 +1,11 @@ package de.hdm_stuttgart.battlearena.Model.DataStorage.Classes; +import de.hdm_stuttgart.battlearena.Controller.Enum.GameMode; +import de.hdm_stuttgart.battlearena.Controller.Enum.GameState; import de.hdm_stuttgart.battlearena.Model.DataStorage.Classes.Exceptions.ParserException; import de.hdm_stuttgart.battlearena.Model.DataStorage.Classes.Utilities.HashGenerator; import de.hdm_stuttgart.battlearena.Model.DataStorage.Classes.Utilities.Parser; +import de.hdm_stuttgart.battlearena.Model.Entity.EntityClass; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -16,6 +19,13 @@ public class RuntimeInfo { protected String mapDataGame; protected boolean offlineMode; //if Account-Type is online but no SQL connection: start game without stats tracking + private GameState gameState = GameState.MENU; //Default value: MENU + private GameMode gameMode = GameMode.LOCAL; //Default value: LOCAL + + //Default value: HUMAN + private EntityClass playerOneClass = EntityClass.HUMAN; + private EntityClass playerTwoClass = EntityClass.HUMAN; + private RuntimeInfo(){}; @@ -48,9 +58,40 @@ public class RuntimeInfo { } } + public GameState getGameState() { + return gameState; + } + + public void setGameState(GameState gameState) { + this.gameState = gameState; + } + + public GameMode getGameMode() { + return gameMode; + } + + public void setGameMode(GameMode gameMode) { + this.gameMode = gameMode; + } + + public EntityClass getPlayerOneClass() { + return playerOneClass; + } + + public void setPlayerOneClass(EntityClass playerOneClass) { + this.playerOneClass = playerOneClass; + } + + public EntityClass getPlayerTwoClass() { + return playerTwoClass; + } + + public void setPlayerTwoClass(EntityClass playerTwoClass) { + this.playerTwoClass = playerTwoClass; + } public int gameTimeInHours(){ return persistenceInst.getStatistics().getGameTime() / 3600; } -} +} \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java index d5b4b382213c197e503a598e855940aa18821998..2e49bcaca57667a7fbea0431ff0fe8c91b356ac5 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java @@ -1,5 +1,6 @@ package de.hdm_stuttgart.battlearena.Model.Entity; +import de.hdm_stuttgart.battlearena.Controller.Enum.PlayerMode; import de.hdm_stuttgart.battlearena.Controller.GameSceneController; import de.hdm_stuttgart.battlearena.Model.Inputs.InputHandler; @@ -12,13 +13,14 @@ public class EntityFactory { private static final Logger log = LogManager.getLogger(EntityFactory.class); - public static IEntity createEntity(EntityType entityType, GraphicsContext gameScene, InputHandler inputHandler, EntityClass entityClass, GameSceneController gameSceneController) { + public static IEntity createEntity(EntityType entityType, GraphicsContext gameScene, InputHandler inputHandler, + EntityClass entityClass, GameSceneController gameSceneController, PlayerMode playerMode) { if (entityType == EntityType.PLAYER) { log.debug("Entity " + entityType + " created"); - return new Player(gameScene, inputHandler, entityClass, gameSceneController); - } else if (entityType == EntityType.ENEMY_PLAYER) { + return new Player(gameScene, inputHandler, entityClass, gameSceneController, playerMode); + } else if (entityType == EntityType.NETWORK_PLAYER_TWO) { log.debug("Entity " + entityType + " created"); - return new EnemyHandler(); + return new NetworkPlayerTwo(); } throw new IllegalArgumentException ("Entity type not supported " + entityType); diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityType.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityType.java index 3e8560772b2e9f049e217bdeca99c30c24150e11..108c4c2037dbcb53d090dc19a59b9b79450d6b68 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityType.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityType.java @@ -2,5 +2,6 @@ package de.hdm_stuttgart.battlearena.Model.Entity; public enum EntityType { PLAYER, - ENEMY_PLAYER + NETWORK_PLAYER_TWO, + LOKAL_PLAYER_TWO } \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/IEntity.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/IEntity.java index 92ca5b53906697c1bad96c2cbb59524b7bc2c40b..f98ddeb7452f60866c2dfe661dff29162c0004b7 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/IEntity.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/IEntity.java @@ -12,19 +12,23 @@ public interface IEntity { void updateEntityMovement(GameSceneController gameScene); + void checkHealTile(IEntity entity, GraphicsContext graphicsContext); + void attack(IEntity entity, GraphicsContext graphicsContext); void updateEntityWalkAnimation(); void renderEntity(GraphicsContext graphicsContext); - BoundingBox getBoxCollider(); + void healPlayer(int heal); + + BoundingBox getBoxCollider(); EntityDirection getEntityDirection(); int getEntitySpeed(); - int gotHit(int damageDone); + void gotHit(int damageDone); int getMapPosX(); diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EnemyHandler.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/NetworkPlayerTwo.java similarity index 75% rename from src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EnemyHandler.java rename to src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/NetworkPlayerTwo.java index c8fc714cc5aa2eefe30e616b5211fe76e6457ff2..d045a108bf051f2e40573e084199808f2edbc630 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EnemyHandler.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/NetworkPlayerTwo.java @@ -9,9 +9,9 @@ import javafx.scene.paint.Color; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; -class EnemyHandler implements IEntity{ +class NetworkPlayerTwo implements IEntity{ - private static final Logger log = LogManager.getLogger(EnemyHandler.class); + private static final Logger log = LogManager.getLogger(NetworkPlayerTwo.class); private final BoundingBox boxCollider = new BoundingBox(300, 200, 48, 48); @@ -36,6 +36,11 @@ class EnemyHandler implements IEntity{ } + @Override + public void checkHealTile(IEntity entity, GraphicsContext graphicsContext) { + + } + @Override public void attack(IEntity entity, GraphicsContext graphicsContext) { @@ -52,6 +57,12 @@ class EnemyHandler implements IEntity{ graphicsContext.fillRect(300, 200, 48, 48); } + @Override + public void healPlayer(int heal) { + log.info("Network player health: " + health); + health -= heal; + } + @Override public BoundingBox getBoxCollider() { return boxCollider; @@ -68,9 +79,9 @@ class EnemyHandler implements IEntity{ } @Override - public int gotHit(int damageDone) { - log.debug(health); - return health -= damageDone; + public void gotHit(int damageDone) { + log.debug("Network player health: " + health); + health -= damageDone; } @Override diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java index fffccf712e14e8a655bbc72622fae7e4c0d5d3b8..0eaf4b2ca5c23f540e284e5ef6e80bf1be36037f 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java @@ -1,8 +1,10 @@ package de.hdm_stuttgart.battlearena.Model.Entity; +import de.hdm_stuttgart.battlearena.Controller.Enum.PlayerMode; import de.hdm_stuttgart.battlearena.Controller.GameSceneController; import de.hdm_stuttgart.battlearena.Model.Inputs.InputHandler; +import de.hdm_stuttgart.battlearena.Model.Map.TileManager; import javafx.geometry.BoundingBox; import javafx.scene.canvas.GraphicsContext; import javafx.scene.image.Image; @@ -16,6 +18,8 @@ class Player implements IEntity { private static final Logger log = LogManager.getLogger(Player.class); + private final PlayerMode PLAYER_MODE; + InputHandler inputHandler; CollisionHandler collisionHandler = new CollisionHandler(); @@ -51,17 +55,24 @@ class Player implements IEntity { private int mapPosX; private int mapPosY; + + private int lastMapPosX; + private int lastMapPosY; + private int playerSpeed; private EntityDirection playerDirection; - private int health = 10; - private int damage = 1; + private int health; + private int maxPlayerHealth; + private int damage; - public Player(GraphicsContext gameScene, InputHandler inputHandler, EntityClass entityClass, GameSceneController gameSceneController) { + public Player(GraphicsContext gameScene, InputHandler inputHandler, EntityClass entityClass, + GameSceneController gameSceneController, PlayerMode PLAYER_MODE) { this.gameScene = gameScene; this.inputHandler = inputHandler; this.entityClass = entityClass; this.gameSceneController = gameSceneController; + this.PLAYER_MODE = PLAYER_MODE; initializeEntity(); loadEntitySprites(); @@ -70,13 +81,45 @@ class Player implements IEntity { @Override public void initializeEntity() { scaledTileSize = gameSceneController.getScaledTileSize(); - mapPosX = 60; - mapPosY = 60; - boxCollider = new BoundingBox(mapPosX+15,mapPosY+10, playerWidth, playerHeight); - playerSpeed = 5; + if (PLAYER_MODE == PlayerMode.PLAYER_ONE) { + mapPosX = 60; + mapPosY = 60; + } else if (PLAYER_MODE == PlayerMode.PLAYER_TWO) { + mapPosX = 760; + mapPosY = 735; + } + + initializePlayerStats(); + + boxCollider = new BoundingBox(mapPosX + 15, mapPosY + 10, playerWidth, playerHeight); playerDirection = EntityDirection.DOWN; } + //Values result from balancing + private void initializePlayerStats() { + if (entityClass == EntityClass.HUMAN) { + maxPlayerHealth = 50; + health = 50; + damage = 5; + playerSpeed = 5; + } else if (entityClass == EntityClass.HIGH_BORN) { + maxPlayerHealth = 100; + health = 75; + damage = 2; + playerSpeed = 3; + } else if (entityClass == EntityClass.LOW_BORN) { + maxPlayerHealth = 10; + health = 10; + damage = 10; + playerSpeed = 7; + } else { + maxPlayerHealth = 40; + health = 15; + damage = 7; + playerSpeed = 5; + } + } + @Override public void loadEntitySprites() { try { @@ -99,19 +142,19 @@ class Player implements IEntity { } private void loadHumanSprites() { - directionDownOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/HumanDown01.png"))); - directionDownTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/HumanDown02.png"))); - directionUpOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/upOne.png"))); - directionUpTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/upTwo.png"))); - directionLeftOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/leftOne.png"))); - directionLeftTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/leftTwo.png"))); - directionRightOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/rightOne.png"))); - directionRightTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/rightTwo.png"))); + directionDownOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanDown00.png"))); + directionDownTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanDown01.png"))); + directionUpOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanUp00.png"))); + directionUpTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanUp01.png"))); + directionLeftOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanLeft00.png"))); + directionLeftTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanLeft01.png"))); + directionRightOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanRight00.png"))); + directionRightTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/human/HumanRight01.png"))); } private void loadHighBornSprites() { - directionDownOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/HumanDown01.png"))); - directionDownTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/HumanDown02.png"))); + directionDownOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/high_born/HighBornDown00.png"))); + directionDownTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/high_born/HighBornDown01.png"))); directionUpOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/upOne.png"))); directionUpTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/upTwo.png"))); directionLeftOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/leftOne.png"))); @@ -132,15 +175,15 @@ class Player implements IEntity { } private void loadSentinelsSprites() { - directionDownOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/HumanDown01.png"))); - directionDownTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/HumanDown02.png"))); + directionDownOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/sentinels/SentinelDown00.png"))); + directionDownTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/sentinels/SentinelDown01.png"))); directionUpOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/upOne.png"))); directionUpTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/upTwo.png"))); directionLeftOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/leftOne.png"))); directionLeftTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/leftTwo.png"))); directionRightOne = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/rightOne.png"))); directionRightTwo = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/player/rightTwo.png"))); - } + } private void loadWeaponSprites() { swordUp = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/weapons/SwordUp.png"))); @@ -151,57 +194,99 @@ class Player implements IEntity { @Override public void updateEntityMovement(GameSceneController gameScene) { - if (inputHandler.isMoveUp() || inputHandler.isMoveDown() || inputHandler.isMoveLeft() || inputHandler.isMoveRight()) { - if (inputHandler.isMoveUp()) { - playerDirection = EntityDirection.UP; - } else if (inputHandler.isMoveDown()) { - playerDirection = EntityDirection.DOWN; - } else if (inputHandler.isMoveLeft()) { - playerDirection = EntityDirection.LEFT; - } else { - playerDirection = EntityDirection.RIGHT; - } - - boolean isWalkableTile = collisionHandler.handleMapCollision(this, scaledTileSize, gameSceneController); - - int lastMapPosX = mapPosX; - int lastMapPosY = mapPosY; - - if (isWalkableTile) { - switch (playerDirection) { - case UP: - mapPosY -= playerSpeed; - break; - case DOWN: - mapPosY += playerSpeed; - break; - case LEFT: - mapPosX -= playerSpeed; - break; - case RIGHT: - mapPosX += playerSpeed; + if (PLAYER_MODE == PlayerMode.PLAYER_ONE) { + if (inputHandler.isMoveUp() || inputHandler.isMoveDown() || inputHandler.isMoveLeft() || inputHandler.isMoveRight()) { + if (inputHandler.isMoveUp()) { + playerDirection = EntityDirection.UP; + } else if (inputHandler.isMoveDown()) { + playerDirection = EntityDirection.DOWN; + } else if (inputHandler.isMoveLeft()) { + playerDirection = EntityDirection.LEFT; + } else if (inputHandler.isMoveRight()) { + playerDirection = EntityDirection.RIGHT; } - } - boolean isEntityCollision = boxCollider.intersects(gameScene.getEnemy().getBoxCollider()); - //boolean isEntityCollision = collisionHandler.handleBoxCollision(boxCollider, gameScene.getEnemy().getBoxCollider()); - - if (isEntityCollision) { - if (playerDirection == EntityDirection.UP) { - mapPosY = lastMapPosY + 30; - } else if (playerDirection == EntityDirection.DOWN) { - mapPosY = lastMapPosY - 30; - } else if (playerDirection == EntityDirection.LEFT) { - mapPosX = lastMapPosX + 30; - } else { - mapPosX = lastMapPosX - 30; + boolean isWalkableTile = collisionHandler.handleMapCollision(this, scaledTileSize, gameSceneController); + + performEntityMovement(isWalkableTile); + + boolean isEntityCollision = boxCollider.intersects(gameScene.getEnemy().getBoxCollider()); + //boolean isEntityCollision = collisionHandler.handleBoxCollision(boxCollider, gameScene.getEnemy().getBoxCollider()); + + performEntityCollision(isEntityCollision); + + updateEntityWalkAnimation(); + } + } else if (PLAYER_MODE == PlayerMode.PLAYER_TWO) { + if (inputHandler.isSdMoveUp() || inputHandler.isSdMoveDown() || inputHandler.isSdMoveLeft() || inputHandler.isSdMoveRight()) { + if (inputHandler.isSdMoveUp()) { + playerDirection = EntityDirection.UP; + } else if (inputHandler.isSdMoveDown()) { + playerDirection = EntityDirection.DOWN; + } else if (inputHandler.isSdMoveLeft()) { + playerDirection = EntityDirection.LEFT; + } else if (inputHandler.isSdMoveRight()) { + playerDirection = EntityDirection.RIGHT; } + + boolean isWalkableTile = collisionHandler.handleMapCollision(this, scaledTileSize, gameSceneController); + + performEntityMovement(isWalkableTile); + + boolean isEntityCollision = boxCollider.intersects(gameScene.getPlayer().getBoxCollider()); + //boolean isEntityCollision = collisionHandler.handleBoxCollision(boxCollider, gameScene.getEnemy().getBoxCollider()); + + performEntityCollision(isEntityCollision); + + updateEntityWalkAnimation(); } + } + } - boxCollider = new BoundingBox(mapPosX+15,mapPosY+10, playerWidth, playerHeight); + private void performEntityMovement(boolean isWalkableTile) { + lastMapPosX = mapPosX; + lastMapPosY = mapPosY; + + if (isWalkableTile) { + switch (playerDirection) { + case UP: + mapPosY -= playerSpeed; + break; + case DOWN: + mapPosY += playerSpeed; + break; + case LEFT: + mapPosX -= playerSpeed; + break; + case RIGHT: + mapPosX += playerSpeed; + } + } + } - updateEntityWalkAnimation(); + private void performEntityCollision(boolean isEntityCollision) { + if (isEntityCollision) { + if (playerDirection == EntityDirection.UP) { + mapPosY = lastMapPosY + 30; + } else if (playerDirection == EntityDirection.DOWN) { + mapPosY = lastMapPosY - 30; + } else if (playerDirection == EntityDirection.LEFT) { + mapPosX = lastMapPosX + 30; + } else { + mapPosX = lastMapPosX - 30; + } + } + boxCollider = new BoundingBox(mapPosX + 15, mapPosY + 10, playerWidth, playerHeight); + } + @Override + public void checkHealTile(IEntity entity, GraphicsContext graphicsContext){ + int xTile = entity.getMapPosX() / gameSceneController.getScaledTileSize(); + int yTile = entity.getMapPosY() / gameSceneController.getScaledTileSize(); + if(TileManager.tileMap[yTile][xTile +1 ] == 5){ + entity.healPlayer(1); + TileManager.tileMap[yTile][xTile +1] = 2; + log.info("Healed +1: " + health); } } @@ -209,47 +294,82 @@ class Player implements IEntity { public void attack(IEntity entity, GraphicsContext graphicsContext) { BoundingBox hitBox; + int xTile = mapPosX / gameSceneController.getScaledTileSize(); + int yTile = mapPosY / gameSceneController.getScaledTileSize(); + //log.info(xTile); + //log.info(yTile); + //int xTile = (int) (Math.random() * (18 - 1)); //Get xTile Coordinate +1 /-1 of playerTile + //int yTile = (int) (Math.random() * (18 - 1)); //Get yTile Coordinate +1 /-1 of playerTile + double dropChance = 0.5; + double randomDropChance = Math.random() * 1; + //log.info(randomDropChance); + //Added and subtracted numbers from variables are the pixel insets of the player sprite int attackRange = 30; int attackWidth = 10; - if (inputHandler.isAttack()){ + if (inputHandler.isAttack() && PLAYER_MODE == PlayerMode.PLAYER_ONE || + inputHandler.isSdAttack() && PLAYER_MODE == PlayerMode.PLAYER_TWO) { if (playerDirection == EntityDirection.UP) { - hitBox = new BoundingBox(mapPosX+playerWidth, mapPosY-10, attackWidth, attackRange); - graphicsContext.strokeRect(mapPosX+playerWidth, mapPosY-10, attackWidth, attackRange); - graphicsContext.drawImage(swordUp, mapPosX+8, mapPosY-10, 32, 32); + hitBox = new BoundingBox(mapPosX + playerWidth, mapPosY - 10, attackWidth, attackRange); + graphicsContext.strokeRect(mapPosX + playerWidth, mapPosY - 10, attackWidth, attackRange); + graphicsContext.drawImage(swordUp, mapPosX + 8, mapPosY - 10, 32, 32); if (hitBox.intersects(entity.getBoxCollider())) { entity.gotHit(damage); graphicsContext.strokeText("Hit", 10, 10); + + if (((TileManager.tileMap[xTile][yTile] == 3) && randomDropChance > dropChance)|| + ((TileManager.tileMap[xTile][yTile] == 1) && randomDropChance > dropChance)) + TileManager.tileMap[yTile-1][xTile+1] = 5; + //TileManager.tileMap[yTile-2][xTile] = 5; + //TileManager.tileMap[yTile-3][xTile] = 5; } } else if (playerDirection == EntityDirection.DOWN) { - hitBox = new BoundingBox(mapPosX+playerWidth, mapPosY+playerHeight, attackWidth, attackRange); - graphicsContext.strokeRect(mapPosX+playerWidth, mapPosY+playerHeight, attackWidth, attackRange); - graphicsContext.drawImage(swordDown, mapPosX+8, mapPosY+playerHeight, 32, 32); + hitBox = new BoundingBox(mapPosX + playerWidth, mapPosY + playerHeight, attackWidth, attackRange); + graphicsContext.strokeRect(mapPosX + playerWidth, mapPosY + playerHeight, attackWidth, attackRange); + graphicsContext.drawImage(swordDown, mapPosX + 8, mapPosY + playerHeight, 32, 32); if (hitBox.intersects(entity.getBoxCollider())) { entity.gotHit(damage); graphicsContext.strokeText("Hit", 10, 10); + + if (((TileManager.tileMap[xTile][yTile] == 3) && randomDropChance > dropChance)|| + ((TileManager.tileMap[xTile][yTile] == 1) && randomDropChance > dropChance)) + TileManager.tileMap[yTile-1][xTile+1] = 5; + //TileManager.tileMap[yTile-2][xTile] = 5; + //TileManager.tileMap[yTile-3][xTile] = 5; } } else if (playerDirection == EntityDirection.LEFT) { - hitBox = new BoundingBox(mapPosX-attackWidth, mapPosY+((double) playerHeight /2), + hitBox = new BoundingBox(mapPosX - attackWidth, mapPosY + ((double) playerHeight / 2), attackRange, attackWidth); - graphicsContext.strokeRect(mapPosX-attackWidth, mapPosY+((double) playerHeight /2), + graphicsContext.strokeRect(mapPosX - attackWidth, mapPosY + ((double) playerHeight / 2), attackRange, attackWidth); - graphicsContext.drawImage(swordLeft, mapPosX-8, mapPosY+8, 32, 32); + graphicsContext.drawImage(swordLeft, mapPosX - 8, mapPosY + 8, 32, 32); if (hitBox.intersects(entity.getBoxCollider())) { entity.gotHit(damage); graphicsContext.strokeText("Hit", 10, 10); + + if (((TileManager.tileMap[xTile][yTile] == 3) && randomDropChance > dropChance)|| + ((TileManager.tileMap[xTile][yTile] == 1) && randomDropChance > dropChance)) + TileManager.tileMap[yTile-1][xTile+1] = 5; + //TileManager.tileMap[yTile-2][xTile] = 5; + //TileManager.tileMap[yTile-3][xTile] = 5; } } else { - hitBox = new BoundingBox(mapPosX+playerWidth+attackWidth, mapPosY+((double) playerHeight /2), + hitBox = new BoundingBox(mapPosX + playerWidth + attackWidth, mapPosY + ((double) playerHeight / 2), attackRange, attackWidth); - graphicsContext.strokeRect(mapPosX+playerWidth+attackWidth, mapPosY+((double) playerHeight /2), + graphicsContext.strokeRect(mapPosX + playerWidth + attackWidth, mapPosY + ((double) playerHeight / 2), attackRange, attackWidth); - graphicsContext.drawImage(swordRight, mapPosX+playerWidth+8, mapPosY+8, 32, 32); + graphicsContext.drawImage(swordRight, mapPosX + playerWidth + 8, mapPosY + 8, 32, 32); if (hitBox.intersects(entity.getBoxCollider())) { entity.gotHit(damage); graphicsContext.strokeText("Hit", 10, 10); + + if (((TileManager.tileMap[xTile][yTile] == 3) && randomDropChance > dropChance)|| + ((TileManager.tileMap[xTile][yTile] == 1) && randomDropChance > dropChance)) + TileManager.tileMap[yTile-1][xTile+1] = 5; + //TileManager.tileMap[yTile-2][xTile] = 5; + //TileManager.tileMap[yTile-3][xTile] = 5; } } } @@ -274,7 +394,7 @@ class Player implements IEntity { Image playerSprite = null; //for debugging collision - graphicsContext.strokeRect(mapPosX+15,mapPosY+10, playerWidth, playerHeight); + graphicsContext.strokeRect(mapPosX + 15, mapPosY + 10, playerWidth, playerHeight); switch (playerDirection) { case UP: @@ -314,6 +434,22 @@ class Player implements IEntity { graphicsContext.drawImage(playerSprite, mapPosX, mapPosY, 48, 48); } + @Override + public void gotHit(int damageDone) { + health -= damageDone; + } + @Override + public void healPlayer(int healthRegenerated) { + int regeneratedHealth = health + healthRegenerated; + + if (regeneratedHealth < maxPlayerHealth) { + health += healthRegenerated; + } else { + health = maxPlayerHealth; + } + log.info(health); + } + @Override public BoundingBox getBoxCollider() { return boxCollider; @@ -329,11 +465,6 @@ class Player implements IEntity { return playerSpeed; } - @Override - public int gotHit(int damageDone) { - return health -= damageDone; - } - @Override public int getMapPosX() { return mapPosX; diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Inputs/InputHandler.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Inputs/InputHandler.java index 8dfd2f3d3d51063e409488e71a25814030ed2f68..a66f47e852aac620010f786bbff62a0700292535 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Inputs/InputHandler.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Inputs/InputHandler.java @@ -18,26 +18,51 @@ public class InputHandler { return inputHandler; } + //Local Player/Player one controls private boolean moveUp, moveDown, moveLeft, moveRight, attack; + //Local player two controls + private boolean sdMoveUp, sdMoveDown, sdMoveLeft, sdMoveRight, sdAttack; + public void handleKeyPress(KeyEvent event) { KeyCode code = event.getCode(); switch (code) { case W: moveUp = true; + log.debug("Player move up"); break; case S: moveDown = true; + log.debug("Player move down"); break; case A: moveLeft = true; + log.debug("Player move left"); break; case D: moveRight = true; + log.debug("Player move right"); break; - case SPACE: + case E: attack = true; + log.debug("Player attack"); + break; + case UP: + sdMoveUp = true; + break; + case DOWN: + sdMoveDown = true; + break; + case LEFT: + sdMoveLeft = true; + break; + case RIGHT: + sdMoveRight = true; + break; + case MINUS: + sdAttack = true; + break; } } @@ -57,8 +82,24 @@ public class InputHandler { case D: moveRight = false; break; - case SPACE: + case E: attack = false; + break; + case UP: + sdMoveUp = false; + break; + case DOWN: + sdMoveDown = false; + break; + case LEFT: + sdMoveLeft = false; + break; + case RIGHT: + sdMoveRight = false; + break; + case MINUS: + sdAttack = false; + break; } } @@ -81,4 +122,24 @@ public class InputHandler { public boolean isAttack() { return attack; } + + public boolean isSdMoveUp() { + return sdMoveUp; + } + + public boolean isSdMoveDown() { + return sdMoveDown; + } + + public boolean isSdMoveLeft() { + return sdMoveLeft; + } + + public boolean isSdMoveRight() { + return sdMoveRight; + } + + public boolean isSdAttack() { + return sdAttack; + } } \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/BackgroundTile.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/BackgroundTile.java index c7fd6bc3ad273c2e2667a9398a33c94764947ea7..b17fb79d9742336e3d008bce528846433d1db394 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/BackgroundTile.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/BackgroundTile.java @@ -10,11 +10,12 @@ class BackgroundTile implements ITile{ private static final Logger log = LogManager.getLogger(BackgroundTile.class); private final Image tileSprite; - private final boolean isWalkable; + private final boolean isWalkable, isDestructible; - public BackgroundTile(Image tileSprite, boolean isWalkable) { + public BackgroundTile(Image tileSprite, boolean isWalkable, boolean isDestructible) { this.tileSprite = tileSprite; this.isWalkable = isWalkable; + this.isDestructible = isDestructible; } @Override @@ -22,6 +23,11 @@ class BackgroundTile implements ITile{ log.debug("Collision type: " + isWalkable + " returned."); return isWalkable; } + @Override + public boolean getDestruction() { + log.debug("Collision type: " + isDestructible + " returned."); + return isWalkable; + } @Override public Image getTileSprite() { diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/ITile.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/ITile.java index f33750bed5ede99e059da2a7fb4e31f33bb735ad..58f711083e43f6be1046bd4d394adf7a3b6e8825 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/ITile.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/ITile.java @@ -4,5 +4,6 @@ import javafx.scene.image.Image; public interface ITile { boolean getCollision(); + boolean getDestruction(); Image getTileSprite(); } \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileFactory.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileFactory.java index 842781646eb4c59e1ba537d172414c7437b498b2..0da1a1558d0e6888a73fa456d3dd81f021d936fc 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileFactory.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileFactory.java @@ -9,13 +9,19 @@ public class TileFactory { private static final Logger log = LogManager.getLogger(TileFactory.class); - public static ITile createTile(TileType tileType, Image tileSprite) { - if (tileType == TileType.WALKABLE) { - log.debug("Tile with type: " + tileType + " created."); - return new BackgroundTile(tileSprite, true); - } else if (tileType == TileType.NON_WALKABLE) { - log.debug("Tile with type: " + tileType + " created."); - return new BackgroundTile(tileSprite, false); + public static ITile createTile(TileType tileType, TileType tileType2, Image tileSprite) { + if (tileType == TileType.WALKABLE && tileType2 == TileType.DESTRUCTIBLE) { + log.info("Tile with type: " + tileType + " " + tileType2 + " created."); + return new BackgroundTile(tileSprite, true, true); + }else if (tileType == TileType.WALKABLE && tileType2 == TileType.NON_DESTRUCTIBLE) { + log.info("Tile with type: " + tileType + " " + tileType2 +" created."); + return new BackgroundTile(tileSprite, true, false); + }else if (tileType == TileType.NON_WALKABLE && tileType2 == TileType.DESTRUCTIBLE) { + log.info("Tile with type: " + tileType + " " + tileType2 +" created."); + return new BackgroundTile(tileSprite, false, true); + }else if (tileType == TileType.NON_WALKABLE && tileType2 == TileType.NON_DESTRUCTIBLE) { + log.info("Tile with type: " + tileType + " " + tileType2 +" created."); + return new BackgroundTile(tileSprite, false, false); } log.error("TileType: " + tileType + " not supported!"); diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileManager.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileManager.java index 480478d51823c0a4992de930e4eea5f2b73f82d8..0ac687dab223e1933fe99bbf42db3dfd3ed8b8b5 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileManager.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileManager.java @@ -14,7 +14,7 @@ public class TileManager { private final GraphicsContext graphicsContext2D; private final ITile[] tileSet; - private final int[][] tileMap; + public static int[][] tileMap; private final int horizontalTileCount; private final int verticalTileCount; @@ -34,16 +34,18 @@ public class TileManager { private void createTiles() { try { - tileSet[0] = TileFactory.createTile(TileType.WALKABLE, + tileSet[0] = TileFactory.createTile(TileType.WALKABLE, TileType.NON_DESTRUCTIBLE, new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/map/Grass01.png")))); - tileSet[1] = TileFactory.createTile(TileType.WALKABLE, + tileSet[1] = TileFactory.createTile(TileType.WALKABLE, TileType.NON_DESTRUCTIBLE, new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/map/Grass02.png")))); - tileSet[2] = TileFactory.createTile(TileType.WALKABLE, + tileSet[2] = TileFactory.createTile(TileType.WALKABLE, TileType.NON_DESTRUCTIBLE, new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/map/Grass04.png")))); - tileSet[3] = TileFactory.createTile(TileType.NON_WALKABLE, + tileSet[3] = TileFactory.createTile(TileType.NON_WALKABLE, TileType.DESTRUCTIBLE, new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/map/Stone01.png")))); - tileSet[4] = TileFactory.createTile(TileType.NON_WALKABLE, + tileSet[4] = TileFactory.createTile(TileType.NON_WALKABLE, TileType.DESTRUCTIBLE, new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/map/Stone02.png")))); + tileSet[5] = TileFactory.createTile(TileType.WALKABLE,TileType.NON_DESTRUCTIBLE, + new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/map/finalheart.png")))); } catch (Exception e) { log.error(e); } diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileType.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileType.java index 17e95c7e93fc890a5f993cc53b7eb6cfd1f4bd6b..efe35788d26be5839df9efee6934ce54ec2c0d63 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileType.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Map/TileType.java @@ -2,5 +2,8 @@ package de.hdm_stuttgart.battlearena.Model.Map; public enum TileType { WALKABLE, - NON_WALKABLE + NON_WALKABLE, + DESTRUCTIBLE, + NON_DESTRUCTIBLE + } \ No newline at end of file diff --git a/src/main/resources/textures/map/finalheart.png b/src/main/resources/textures/map/finalheart.png new file mode 100644 index 0000000000000000000000000000000000000000..b861b145ceb949abdd7222a2679fe8e10756340f Binary files /dev/null and b/src/main/resources/textures/map/finalheart.png differ diff --git a/src/main/resources/textures/player/high_born/HighBornDown00.png b/src/main/resources/textures/player/high_born/HighBornDown00.png new file mode 100644 index 0000000000000000000000000000000000000000..b87b19b2ffe1ce2048c6d8bc96d1e4a66fd4c4af Binary files /dev/null and b/src/main/resources/textures/player/high_born/HighBornDown00.png differ diff --git a/src/main/resources/textures/player/high_born/HighBornDown01.png b/src/main/resources/textures/player/high_born/HighBornDown01.png new file mode 100644 index 0000000000000000000000000000000000000000..787b4603347dac4b2d5f2c1063b3e3a3551fed4a Binary files /dev/null and b/src/main/resources/textures/player/high_born/HighBornDown01.png differ diff --git a/src/main/resources/textures/player/human/HumanDown00.png b/src/main/resources/textures/player/human/HumanDown00.png new file mode 100644 index 0000000000000000000000000000000000000000..980612cb998a80e7710798fbd2f8a81791ef7322 Binary files /dev/null and b/src/main/resources/textures/player/human/HumanDown00.png differ diff --git a/src/main/resources/textures/player/human/HumanDown01.png b/src/main/resources/textures/player/human/HumanDown01.png new file mode 100644 index 0000000000000000000000000000000000000000..54792ff64f25e5c6e48e35f90502ff2d7fea9893 Binary files /dev/null and b/src/main/resources/textures/player/human/HumanDown01.png differ diff --git a/src/main/resources/textures/player/human/HumanLeft00.png b/src/main/resources/textures/player/human/HumanLeft00.png new file mode 100644 index 0000000000000000000000000000000000000000..2d259ebb0c88259967e361c93138dd3367bcfe1b Binary files /dev/null and b/src/main/resources/textures/player/human/HumanLeft00.png differ diff --git a/src/main/resources/textures/player/human/HumanLeft01.png b/src/main/resources/textures/player/human/HumanLeft01.png new file mode 100644 index 0000000000000000000000000000000000000000..3e25fce1c897aa94297d73248a54b1c09700d8d2 Binary files /dev/null and b/src/main/resources/textures/player/human/HumanLeft01.png differ diff --git a/src/main/resources/textures/player/human/HumanRight00.png b/src/main/resources/textures/player/human/HumanRight00.png new file mode 100644 index 0000000000000000000000000000000000000000..f20b2b692e98c68bc6671b0294a3582b4de65f0b Binary files /dev/null and b/src/main/resources/textures/player/human/HumanRight00.png differ diff --git a/src/main/resources/textures/player/human/HumanRight01.png b/src/main/resources/textures/player/human/HumanRight01.png new file mode 100644 index 0000000000000000000000000000000000000000..ba2dd289825604b6730186ffb862592b2d94bb12 Binary files /dev/null and b/src/main/resources/textures/player/human/HumanRight01.png differ diff --git a/src/main/resources/textures/player/human/HumanUp00.png b/src/main/resources/textures/player/human/HumanUp00.png new file mode 100644 index 0000000000000000000000000000000000000000..bf2042d6a68463fa8c392c03d5cfaa973f9d1ae4 Binary files /dev/null and b/src/main/resources/textures/player/human/HumanUp00.png differ diff --git a/src/main/resources/textures/player/human/HumanUp01.png b/src/main/resources/textures/player/human/HumanUp01.png new file mode 100644 index 0000000000000000000000000000000000000000..c21f00058a48f3c99b1eeaae7f2d93f8baef1471 Binary files /dev/null and b/src/main/resources/textures/player/human/HumanUp01.png differ diff --git a/src/main/resources/textures/player/sentinels/SentinelDown00.png b/src/main/resources/textures/player/sentinels/SentinelDown00.png new file mode 100644 index 0000000000000000000000000000000000000000..c2fb803e03f3d459baeb4188975192ef83aa3b71 Binary files /dev/null and b/src/main/resources/textures/player/sentinels/SentinelDown00.png differ diff --git a/src/main/resources/textures/player/sentinels/SentinelDown01.png b/src/main/resources/textures/player/sentinels/SentinelDown01.png new file mode 100644 index 0000000000000000000000000000000000000000..bb87d3b89b7a54dd62fde0c509d9d0ae09e549c4 Binary files /dev/null and b/src/main/resources/textures/player/sentinels/SentinelDown01.png differ