Package de.tum.cit.fop.maze.MVC
Class CharacterWASD
java.lang.Object
de.tum.cit.fop.maze.MVC.CharacterWASD
Handles player input for WASD movement and attack animations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidattackChange(Player player, MazeRunnerGame game) Changes player animation to appropriate attack direction.static booleanxAxis(Player player, MazeRunnerGame game) Handles horizontal (X-axis) player movement input.static booleanyAxis(Player player, MazeRunnerGame game) Handles vertical (Y-axis) player movement input.
-
Constructor Details
-
CharacterWASD
public CharacterWASD()
-
-
Method Details
-
yAxis
Handles vertical (Y-axis) player movement input.- Parameters:
player- The player to movegame- Game instance for input settings- Returns:
- True if player is moving vertically
-
xAxis
Handles horizontal (X-axis) player movement input.- Parameters:
player- The player to movegame- Game instance for input settings- Returns:
- True if player is moving horizontally
-
attackChange
Changes player animation to appropriate attack direction.- Parameters:
player- The player performing attackgame- Game instance for animation data
-