ORK Framework
3.17.1
API Documentation
|
Public Member Functions | |
virtual void | FireChanged () |
virtual void | Clear (bool clearLocked) |
Removes all current data in the combatant handler. More... | |
virtual void | Tick () |
Updates all registered combatants, called each frame. More... | |
virtual void | UpdateAnimations () |
Update animations of all registered combatants. Usually called when the timescale was changed. More... | |
virtual string | CreateGUID () |
Creates a new GUID currently not used in the combatant handler. More... | |
virtual Combatant | Get (string guid) |
virtual Combatant | Get (int id) |
virtual void | GUIDChanged (Combatant combatant, string oldGUID) |
virtual string | CreateGroupGUID () |
Creates a new GUID for a group currently not used in the combatant handler. More... | |
virtual Group | GetGroup (string guid) |
virtual void | GUIDChanged (Group group, string oldGUID) |
virtual void | AddGroup (Group group) |
virtual void | RemoveGroup (Group group) |
virtual void | Add (Combatant combatant, bool isJoiningBattle) |
Adds/registers a combatant. More... | |
virtual void | Remove (Combatant combatant) |
Removes/unregisters a combatant. More... | |
virtual void | AddInBattle (Combatant combatant) |
Adds/registers a combatant to the in-battle list. The in-battle list is only for a quick reference to combatants currently participating in battle. More... | |
virtual void | RemoveInBattle (Combatant combatant) |
Removes/unregisters a combatant from the in-battle list. The in-battle list is only for a quick reference to combatants currently participating in battle. More... | |
List< Combatant > | GetInBattle () |
Gets all combatants currently in battle. Don't change the returned list unless you know what you're doing. More... | |
virtual void | Lock (Combatant combatant) |
Blocks a combatant from being removed. More... | |
virtual bool | IsLocked (Combatant combatant) |
Checks if a combatant is currently locked (i.e. blocked from being removed). More... | |
virtual bool | Unlock (Combatant combatant) |
Unblocks a combatant from being removed, i.e. the combatant can be removed from now on. More... | |
virtual void | LockBattle () |
Locks all currently registered combatants that are in battle. More... | |
virtual void | UnlockBattle () |
Unlocks all currently registered combatants that are in battle. More... | |
virtual void | SpawnBattle () |
Spawns all currently registered combatants that are in battle and not yet spawned. More... | |
virtual void | StartRealTimeAreaBattle () |
Joins all spawned (real time battle) combatants to the battle. More... | |
virtual void | EndBattle () |
Ends the battle for all registered combatants that are currently in battle. More... | |
virtual void | CheckDeath () |
Performs checks on all registered combatants if they've died and aren't marked as dead yet. More... | |
virtual List< Combatant > | GetAll () |
Gets all currently registered combatants. More... | |
virtual List< Combatant > | Get (bool addPlayerGroup, Consider isDead, Consider inBattle) |
Gets a list of combatants, considering their death and battle state. More... | |
virtual void | Get (ref List< Combatant > list, bool addPlayerGroup, Consider isDead, Consider inBattle) |
Adds combatants to a provided list, considering their death and battle state. More... | |
virtual List< Combatant > | Get (Combatant user, bool addPlayerGroup, IRange range, Consider isEnemy, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets a list of combatants within a defined range of a user. More... | |
virtual void | Get (ref List< Combatant > list, Combatant user, bool addPlayerGroup, IRange range, Consider isEnemy, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Adds combatants within a defined range of a user to a provided list. More... | |
virtual void | Get (ref List< Combatant > allies, ref List< Combatant > enemies, Combatant user, bool addPlayerGroup, IRange range, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Adds combatants within a defined range of a user to a provided list. More... | |
virtual List< Combatant > | Get (Vector3 position, Combatant user, bool addPlayerGroup, IRange range, Consider isEnemy, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets a list of combatants within a defined range to a position. More... | |
virtual void | Get (ref List< Combatant > list, Vector3 position, Combatant user, bool addPlayerGroup, IRange range, Consider isEnemy, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Adds combatants within a defined range to a position to a provided list. More... | |
virtual void | GetInGridRange (ref List< Combatant > list, Combatant user, bool addPlayerGroup, bool ignoreCellSize, bool blockDiagonalDistance1, int minDistance, int maxDistance, Consider isEnemy, Consider isDead, Consider inBattle, GridCellOriginCheck check) |
Adds combatants within a defined grid range to the user to a provided list. More... | |
virtual void | GetInGridRange (ref List< Combatant > list, Combatant user, BattleGridCellComponent origin, bool addPlayerGroup, bool ignoreCellSize, bool blockDiagonalDistance1, int minDistance, int maxDistance, Consider isEnemy, Consider isDead, Consider inBattle, GridCellOriginCheck check) |
Adds combatants within a defined grid range to an origin cell to a provided list. More... | |
virtual List< FactionSetting > | GetFactions (Combatant user, bool addPlayerGroup, IRange range, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets a list of faction IDs of all registered combatants within a defined range of a user. More... | |
virtual List< Combatant > | GetFactionMembers (Combatant user, FactionSetting faction, bool addPlayerGroup, IRange range, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets a list of combatants within a defined range of a user that are part of a defined faction. More... | |
virtual List< Group > | GetFactionGroups (FactionSetting faction) |
Gets a list of groups of a defined faction ID. More... | |
virtual List< Group > | GetGroups (Combatant user, bool addPlayerGroup, Consider isEnemy) |
Gets a list of groups of a defined faction ID. More... | |
virtual void | NotifyFactionAggressionStateChange (Combatant combatant, Combatant aggressor) |
Notifies a faction's combatants that one of their combatant's changed it's aggression state. More... | |
virtual Dictionary< FactionSetting, List< Combatant > > | GetByFaction (Combatant user, bool addPlayerGroup, IRange range, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets a dictionary containing lists of combatants per faction that are within range of a user. More... | |
virtual Combatant | GetRandom (Combatant user, bool addPlayerGroup, IRange range, Consider isEnemy, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets a random combatant matching defined conditions. More... | |
virtual Combatant | GetOffset (Combatant current, int add, TargetSelectionSortType sortType, Combatant user, bool addPlayerGroup, IRange range, Consider isEnemy, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets a combatant with an offset to a defined combatant in a list of combatants matching defined conditions. More... | |
virtual Combatant | GetNearest (Combatant user, bool addPlayerGroup, IRange range, Consider isEnemy, Consider isDead, Consider inBattle, CheckCombatant2 check) |
Gets the nearest combatant to the user within a defined range. More... | |
Protected Attributes | |
GUIDCollection< Combatant > | combatants = new GUIDCollection<Combatant>() |
GUIDCollection< Group > | groups = new GUIDCollection<Group>() |
Dictionary< Group, int > | groupCount = new Dictionary<Group, int>() |
List< Combatant > | locked = new List<Combatant>() |
List< Combatant > | inBattle = new List<Combatant>() |
Notify | changeHandler |
NotifyCombatant | addedHandler |
NotifyCombatant | removedHandler |
Properties | |
virtual Notify | Changed |
virtual NotifyCombatant | Added |
virtual NotifyCombatant | Removed |
|
virtual |
Adds/registers a combatant.
combatant | The combatant that will be registered. |
isJoiningBattle | true if the combatant is currently joining the battle. |
|
virtual |
Adds/registers a combatant to the in-battle list. The in-battle list is only for a quick reference to combatants currently participating in battle.
combatant | The combatant that will be added. |
|
virtual |
Performs checks on all registered combatants if they've died and aren't marked as dead yet.
|
virtual |
Removes all current data in the combatant handler.
clearLocked | true if locked combatants should also be removed. |
|
virtual |
Creates a new GUID for a group currently not used in the combatant handler.
|
virtual |
Creates a new GUID currently not used in the combatant handler.
|
virtual |
Ends the battle for all registered combatants that are currently in battle.
|
virtual |
Gets a list of combatants, considering their death and battle state.
addPlayerGroup | true if player group combatants should be added. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
|
virtual |
Adds combatants to a provided list, considering their death and battle state.
list | The list the matching combatants will be added to. |
addPlayerGroup | true if player group combatants should be added. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
|
virtual |
Gets a list of combatants within a defined range of a user.
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Adds combatants within a defined range of a user to a provided list.
list | The list the matching combatants will be added to. |
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Adds combatants within a defined range of a user to a provided list.
allies | The list the matching allied combatants will be added to. |
enemies | The list the matching enemy combatants will be added to. |
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets a list of combatants within a defined range to a position.
position | The position used for the check. |
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Adds combatants within a defined range to a position to a provided list.
list | The list the matching combatants will be added to. |
position | The position used for the check. |
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets all currently registered combatants.
|
virtual |
Gets a dictionary containing lists of combatants per faction that are within range of a user.
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets a list of groups of a defined faction ID.
faction | The ID of the faction. |
|
virtual |
Gets a list of combatants within a defined range of a user that are part of a defined faction.
user | The user combatant. |
faction | The ID of the faction. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets a list of faction IDs of all registered combatants within a defined range of a user.
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets a list of groups of a defined faction ID.
user | The user combatant. |
addPlayerGroup | true if the player group should be added. |
isEnemy | Defines if user and other combatants should be enemies. |
List<Combatant> GamingIsLove.ORKFramework.CombatantHandler.GetInBattle | ( | ) |
Gets all combatants currently in battle. Don't change the returned list unless you know what you're doing.
|
virtual |
Adds combatants within a defined grid range to the user to a provided list.
list | The list the matching combatants will be added to. |
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
ignoreCellSize | Ignores the combatant's cell size. |
blockDiagonalDistance1 | |
minDistance | The minimum grid distance. |
maxDistance | The maximum grid distance. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Adds combatants within a defined grid range to an origin cell to a provided list.
list | The list the matching combatants will be added to. |
user | The user combatant. |
origin | The origin cell. |
addPlayerGroup | true if player group combatants should be added. |
ignoreCellSize | Ignores the combatant's cell size. |
blockDiagonalDistance1 | |
minDistance | The minimum grid distance. |
maxDistance | The maximum grid distance. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets the nearest combatant to the user within a defined range.
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets a combatant with an offset to a defined combatant in a list of combatants matching defined conditions.
current | The current combatant used as index basis. |
add | The offset added to the current combatant's index. |
sortType | Defines how the list of matching combatants will be sorted, e.g. by distance to the user. |
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Gets a random combatant matching defined conditions.
user | The user combatant. |
addPlayerGroup | true if player group combatants should be added. |
range | The range that will be used. |
isEnemy | Defines if user and other combatants should be enemies. |
isDead | Defines if and how the death state is checked. |
inBattle | Defines if and how the battle state is checked. |
check | (Optional) Delegate function to perform additional checks. Pass null to not use. |
|
virtual |
Checks if a combatant is currently locked (i.e. blocked from being removed).
combatant | The combatant that will be checked for. |
true
if the combatant is currently locked.
|
virtual |
Blocks a combatant from being removed.
combatant | The combatant that will be locked. |
|
virtual |
Locks all currently registered combatants that are in battle.
|
virtual |
Notifies a faction's combatants that one of their combatant's changed it's aggression state.
combatant | The combatant. |
|
virtual |
Removes/unregisters a combatant.
combatant | The combatant that will be unregistered. |
|
virtual |
Removes/unregisters a combatant from the in-battle list. The in-battle list is only for a quick reference to combatants currently participating in battle.
combatant | The combatant that will be removed. |
|
virtual |
Spawns all currently registered combatants that are in battle and not yet spawned.
|
virtual |
Joins all spawned (real time battle) combatants to the battle.
|
virtual |
Updates all registered combatants, called each frame.
|
virtual |
Unblocks a combatant from being removed, i.e. the combatant can be removed from now on.
combatant | The combatant that willbe unlocked. |
true
if the combatant was unlocked (i.e. it was previously locked).
|
virtual |
Unlocks all currently registered combatants that are in battle.
|
virtual |
Update animations of all registered combatants. Usually called when the timescale was changed.