Blaze Brigade
Rev0
|
Contains functions pertaining to the general game. More...
Static Public Member Functions | |
static bool | isEnemyUnitInRange (Graph graph, Unit unit, Unit enemyUnit) |
static void | startTurn (Player player) |
static bool | hasUnitFinishedActions (Unit unit) |
static bool | isTurnOver () |
static bool | isGameOver (Player player1, Player player2) |
static LinkedList< Node > | setMovableNodes (Graph graph, Unit unit) |
static LinkedList< Node > | getAttackableNodes (Graph graph, Unit unit) |
static LinkedList< Node > | getAttackRangeAfterMoving (Graph graph, Unit unit) |
static LinkedList< Node > | pathFinder (Graph graph, Unit unit, Node start, Node end) |
static void | removeUnit (Graph graph, Player player, Unit unit) |
static void | deselectUnit () |
static Unit | getUnitOnNodeClicked (Node clickedNode, Vector2 positionClicked, Player player) |
static void | updateUnitPosition (Graph graph, Vector2 position, LinkedList< Node > path) |
static void | endTurn () |
static void | buttonAction (Button button, Graph graph) |
static bool | isMagicalAttack (Unit unit) |
static Button | getMenuButtonClicked (Vector2 mouseCoordinates, Camera camera) |
static void | scrollMap (Camera camera, int mouseX, int mouseY) |
Contains functions pertaining to the general game.
This class holds useable functions in the scope of the entire gameplay.
Updates the Model based upon button clicks.
button | Button that was clicked. |
graph | Graph of the map. |
|
static |
Deselects any selected unit.
|
static |
Ends the current player's turn and starts the enemy player's turn.
|
static |
Returns a list of nodes that the unit can perform an attack on. Assumes the unit has not yet moved.
graph | Graph representing the current game map. |
unit | Specfied unit. |
|
static |
Returns whether or not the specified enemy unit is within attack range of the specified unit. Assumes the unit has already moved.
graph | Graph representing the current game map. |
Specified | unit. |
|
static |
Returns the menu button that was clicked; if no menu button was clicked, returns null.
mouseCoordinates | Coordinates of the mouse click. |
camera | The camera of the game. |
|
static |
If unit exists where user clicked (that belongs to player), return it; else, return null.
clickedNode | Node where user has clicked. |
positionClicked | position (by node) of where the user has clicked. |
player | Player that is currently moving. |
|
static |
Returns whether or not the specified unit can perform actions.
unit | Specified unit. |
|
static |
Returns whether or not the specified enemy unit is within attack range of the specified unit.
graph | Graph representing the current game map. |
unit | Specified playable unit. |
enemyUnit | Specified enemy unit. |
Returns whether or not the game is over, based off win conditions.
|
static |
Returns whether or not the unit performed a magical attack.
unit | Unit to check. |
|
static |
Returns whether or not the current turn is over.
|
static |
Returns a list of nodes representing the path from start node to end node; if no path is valid, return null.
graph | Graph representing the current game map. |
unit | Unit to move. |
start | Start Node of the path. |
end | End Node of the path |
Removes the specified unit from the game.
unit | unit to remove from the game. |
|
static |
Enables scrolling of the map based on mouse position.
camera | The camera of the game. |
mouseX | x-coordinate of the mouse position. |
mouseY | y-coordinate of the mouse position. |
Returns a list of nodes that the unit can move onto.
graph | Graph representing the current game map. |
Specified | unit. |
|
static |
Must be called upon the start of a new turn. Resets all unit buttons and game states.
player | Player of the new turn. |
|
static |
Updates the unit's position to the clicked position.
graph | Graph representing the current game map. |
position | Position (by node) to move the unit to. |
path | Path to move the unit along. |