ORK Framework  2.24.0
API Documentation
ORKFramework.Combatants.CombatantActions Class Reference
Inheritance diagram for ORKFramework.Combatants.CombatantActions:
ORKFramework.ISaveData

Public Member Functions

 CombatantActions (Combatant owner)
 
void FireActionStateChanged ()
 Notifies all action state change listeners that the action state changed. More...
 
void FireCastingStateChanged ()
 Notifies all casting state change listeners that the casting state changed. More...
 
void FireChoosingStateChanged ()
 Notifies all choosing state change listeners that the choosing state changed. More...
 
void Clear (bool start)
 Clears the queued actions and states - used at the start and end of a battle. More...
 
void Choose (bool newTurn, bool autoCallMenu)
 The combatant chooses a battle action. Depending on the combatant (e.g. player, enemy, AI controlled), either displays the battle menu or chooses an action based on AI settings. More...
 
void ChooseAuto (bool newTurn)
 
void SelectingGridHighlight (bool doHighlight)
 
void Add (BaseAction action, bool newTurn)
 Lets the combatant fire a battle action. Depending on the state and battle systems the action can be added to the battle's action queue, the combatant's action queue or not fired at all. More...
 
void Removed ()
 Notifies the combatant that his actions have been removed from the battle's action queue. More...
 
bool DequeueNextAction ()
 Dequeues the next action from the combatant's action queue and add's it to the battle's action queue. More...
 
void AddNextAction (BaseAction action, NextBattleActionChange actionChange)
 Adds a battle action as next action of the combatant. The combatant will try to use this action the next time he can choose an action. More...
 
bool AllowPerformingAction (bool isAutoAttack)
 Checks if the combatant is able to perform an action. More...
 
BaseAction GetCastingAction ()
 
bool CanCastMove ()
 
bool CanCancelCast ()
 
void CastAction (BaseAction action)
 The combatant will cast the action. More...
 
void CancelCast ()
 Cancel casting an action. More...
 
void InitActionCombos ()
 
void AddActionCombo (int comboID)
 
void RemoveActionCombo (int comboID)
 
bool HasActionCombo (int comboID)
 
void CheckActionCombos (BaseAction performedAction)
 
void ResetActionCombos ()
 
void Tick (float battleTime)
 Update function called each frame. More...
 
DataObject SaveGame ()
 Used to save the data - you need to add the data to a ORKFramework.DataObject. More...
 
void LoadGame (DataObject data)
 Used to load the data - you need to get the data from the ORKFramework.DataObject. More...
 

Properties

CombatantChanged ActionStateChanged
 
CombatantChanged CastingStateChanged
 
CombatantChanged ChoosingStateChanged
 
int Count [get]
 Gets the number of queued actions. More...
 
CombatantActionState ActionState [get, set]
 Gets or sets a value indicating whether the combatant is in action (i.e. performs a battle action). More...
 
bool BlockActionUse [get, set]
 
bool IsChoosing [get, set]
 Gets or sets a value indicating whether the combatant is choosing an action. More...
 
bool IsPreChoosing [get]
 
bool CanChoose [get]
 Gets a value indicating whether the combatant can choose an action. More...
 
bool FinishedChoosing [get, set]
 
bool IsSelectingCellHighlight [get]
 
bool AutoAttacking [get]
 Gets a value indicating whether the combatant is currently auto attacking. More...
 
bool FinishAttackQueue [get, set]
 Gets or sets a value indicating whether the combatant should finish his action queue (i.e. use all actions added to his queue). More...
 
bool IsWaiting [get, set]
 Gets or sets a value indicating whether the combatant is waiting for an action to start. More...
 
bool Fired [get]
 Gets a value indicating whether the combatant fired an action. More...
 
bool IsCasting [get]
 Determines whether the combatant is casting an action. More...
 
float CastTime [get]
 Gets the remaining cast time of the casting action. More...
 
float CastTimeMax [get]
 Gets the maximum cast time of the casting action. More...
 

Member Function Documentation

void ORKFramework.Combatants.CombatantActions.Add ( BaseAction  action,
bool  newTurn 
)

Lets the combatant fire a battle action. Depending on the state and battle systems the action can be added to the battle's action queue, the combatant's action queue or not fired at all.

Parameters
actionThe action.
newTurntrue if a new turn should be initialized.
void ORKFramework.Combatants.CombatantActions.AddNextAction ( BaseAction  action,
NextBattleActionChange  actionChange 
)

Adds a battle action as next action of the combatant. The combatant will try to use this action the next time he can choose an action.

Parameters
actionThe battle action.
bool ORKFramework.Combatants.CombatantActions.AllowPerformingAction ( bool  isAutoAttack)

Checks if the combatant is able to perform an action.

Returns
true if the combatant can perform actions; otherwise false.
Parameters
isAutoAttacktrue if checking for performing an auto attack.
void ORKFramework.Combatants.CombatantActions.CancelCast ( )

Cancel casting an action.

void ORKFramework.Combatants.CombatantActions.CastAction ( BaseAction  action)

The combatant will cast the action.

Parameters
actionThe action to cast.
void ORKFramework.Combatants.CombatantActions.Choose ( bool  newTurn,
bool  autoCallMenu 
)

The combatant chooses a battle action. Depending on the combatant (e.g. player, enemy, AI controlled), either displays the battle menu or chooses an action based on AI settings.

void ORKFramework.Combatants.CombatantActions.Clear ( bool  start)

Clears the queued actions and states - used at the start and end of a battle.

Parameters
starttrue if at the start of a battle.
bool ORKFramework.Combatants.CombatantActions.DequeueNextAction ( )

Dequeues the next action from the combatant's action queue and add's it to the battle's action queue.

Returns
true if an action was available; otherwise false.
void ORKFramework.Combatants.CombatantActions.FireActionStateChanged ( )

Notifies all action state change listeners that the action state changed.

void ORKFramework.Combatants.CombatantActions.FireCastingStateChanged ( )

Notifies all casting state change listeners that the casting state changed.

void ORKFramework.Combatants.CombatantActions.FireChoosingStateChanged ( )

Notifies all choosing state change listeners that the choosing state changed.

void ORKFramework.Combatants.CombatantActions.LoadGame ( DataObject  data)

Used to load the data - you need to get the data from the ORKFramework.DataObject.

Parameters
dataA ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

void ORKFramework.Combatants.CombatantActions.Removed ( )

Notifies the combatant that his actions have been removed from the battle's action queue.

DataObject ORKFramework.Combatants.CombatantActions.SaveGame ( )

Used to save the data - you need to add the data to a ORKFramework.DataObject.

Returns
A ORKFramework.DataObject containing the data.

Implements ORKFramework.ISaveData.

void ORKFramework.Combatants.CombatantActions.Tick ( float  battleTime)

Update function called each frame.

Parameters
battleTimeThe time since the last tick.

Property Documentation

CombatantActionState ORKFramework.Combatants.CombatantActions.ActionState
getset

Gets or sets a value indicating whether the combatant is in action (i.e. performs a battle action).

true if in action; otherwise, false.

bool ORKFramework.Combatants.CombatantActions.AutoAttacking
get

Gets a value indicating whether the combatant is currently auto attacking.

true if auto attacking; otherwise, false.

bool ORKFramework.Combatants.CombatantActions.CanChoose
get

Gets a value indicating whether the combatant can choose an action.

true if the combatant can choose; otherwise, false.

float ORKFramework.Combatants.CombatantActions.CastTime
get

Gets the remaining cast time of the casting action.

Returns
The cast time.
float ORKFramework.Combatants.CombatantActions.CastTimeMax
get

Gets the maximum cast time of the casting action.

Returns
The maximum cast time.
int ORKFramework.Combatants.CombatantActions.Count
get

Gets the number of queued actions.

The action count.

bool ORKFramework.Combatants.CombatantActions.FinishAttackQueue
getset

Gets or sets a value indicating whether the combatant should finish his action queue (i.e. use all actions added to his queue).

true if the action queue should be finished; otherwise, false.

bool ORKFramework.Combatants.CombatantActions.Fired
get

Gets a value indicating whether the combatant fired an action.

true if fired; otherwise, false.

bool ORKFramework.Combatants.CombatantActions.IsCasting
get

Determines whether the combatant is casting an action.

Returns
true if casting; otherwise, false.
bool ORKFramework.Combatants.CombatantActions.IsChoosing
getset

Gets or sets a value indicating whether the combatant is choosing an action.

true if choosing; otherwise, false.

bool ORKFramework.Combatants.CombatantActions.IsWaiting
getset

Gets or sets a value indicating whether the combatant is waiting for an action to start.

true if waiting; otherwise, false.