Skills
Contains the logic of handling all skill related actions like unlocking, executing.
Implementation
Inheritance
MonoBehaviour --> GlobalID --> Skills
IGameSave --> Skills
Classes
Name
Description
Contains the values for a saved skill
Contains an array of saved skills
Contains the arguments for generating an OnChangeSkill event
Event class that is fired when activating a skill
Event class that is fired when resetting all skills
Fields
Name
Description
SKILLS
Dictionary containing all skills
SKILLSSETTINGS
Contains the skills settings
skillsList
List containing all skills
MSG_ERROR_LEVELNOTASSIGNED
Constant string indicating the level has not been assigned
MSG_ERROR_SKILLPOINTSNOTASSIGNED
Constant string indicating the skill points have not been assigned
MSG_ERROR_STATSCOMPONENTNOTASSIGNED
Constant string indicating the stats component has not been assigned
useSkillBar
Checkbox to define whether the to use the skill bar feature or not
skillBarElements
Reference to the skill bar gameobject
saveSkills
Checkbox to define whether to save the skills or not
skillBarConfigurationModeOn
Boolean variable to indicate whether the skill bar configuration mode is active
skillTreeWindowOpen
Boolean variable to indicate whether the skill tree window is open
skillTreeUIManager
Reference to the skill tree ui manager component
onChangeSkill
Action to be executed when a skill is changed
eventOnActivateStart
Event for subscribing to when the activation phase starts
eventOnActivateEnd
Event for subscribing to when the activation phase ends
eventOnCastStart
Event for subscribing to when the casting phase starts
eventOnCastEnd
Event for subscribing to when the casting phase ends
eventOnExecuteStart
Event for subscribing to when the execution phase starts
eventOnExecuteEnd
Event for subscribing to when the execution phase ends
eventOnFinishingStart
Event for subscribing to when the finish phase starts
eventOnFinishingEnd
Event for subscribing to when the finish phase ends
eventSkillsReset
Methods
Name
Description
Awake()
Awake is called when the script instance is being loaded
Start()
Initializes the events, skills and save/load functionality
OnDestroy()
Called when the gameobject is deleted
GetSkillsDictionary()
Returns the skills dictionary
GetSkillPoints()
Returns the amount of skill points
GetLevel()
Returns the level
GetSkill(int)
Returns a skill by uuid
GetSkills()
Returns a list of all skills
GetSkillID(int)
Returns the uuid of a skill by uuid
GetSkillState(int)
Returns the state of a skill
GetSkillLockedState(int, Skill.SkillState)
Returns a boolean indicating whether the skill is locked or not
GetSkillExecutionState(SkillAsset)
Returns a boolean indicating whether the skill is currently executing or not
LockSkill(SkillAsset, [bool])
Locks a skill
UnlockSkill(SkillAsset, [bool])
Unlocks a skill
UpdateSkillState(int, SkillSkillState)
Updates the state of a skill
CheckSkillRequirements(SkillAsset)
Returns a boolean indicating whether a skill passes the requirements
CheckSkillLevel(SkillAsset)
Checks the level of a skill
CheckSkillReliesOnSkills(SkillAsset)
Checks the relying skills of a skill
CheckSkillOtherConditions(SkillAsset)
Checks the other conditions of a skill
CheckSkillSkillPoints(SkillAsset)
Checks the skill points of a skill
ExecuteSkill(SkillHolder)
Executes a skill
ExecuteSkill(SkillAsset)
Executes a skill
ExecuteSkillPermanent(int uuid)
Executes a permanent skill
ExecuteStartActivationPhase(SkillAsset)
Starts the activation phase of a skill
ExecuteEndActivationPhase(SkillAsset)
Ends the activation phase of a skill
ExecuteStartCastPhase(SkillAsset)
Starts the cast phase of a skill
ExecuteEndCastPhase(SkillAsset)
Ends the cast phase of a skill
ExecuteStartExecutionPhase(SkillAsset)
Starts the execution phase of a skill
ExecuteEndExecutionPhase(SkillAsset)
Ends the execution phase of a skill
ExecuteStartFinishPhase(SkillAsset)
Starts the finish phase of a skill
ExecuteEndFinishPhase(SkillAsset)
Ends the finish phase of a skill
StartCooldown(SkillAsset)
Starts the cooldown process of a skill
StartCooldownStored(SkillAsset)
Starts the cooldown process of a stored skill
StopCooldown(SkillAsset)
Ends the cooldown process of a skill
CancelExecutingSkillBar(SkillAsset)
Cancels the execution phase of a skill in the skill bar
UpdateSkillBar(SkillAsset)
Updates the skill bar for a skill
CancelExecutingSkill(SkillAsset, [bool], [bool])
Cancels an executing skill
CancelExecutingSkill(SkillHolder, [bool], [bool])
Cancels an executing skill
CancelExecutingSkills([bool], [bool])
Cancels all executing skills
ResetAllSkills()
Resets all skills
ResetSkill(SkillAsset)
Resets a skill
ResetSkill(SkillHolder)
Resets a skill
SyncSkillBarSkills(SkillBarSkillTreeElement, SkillAsset)
Sync the skills with the skill bar
ChangeSkillType(SkillHolder, int)
Changes the type of a skill
ChangeSkillExecutionSettings(SkillHolder, float, float, float, float, float, float)
Changes the skill execution settings of a skill
ResetPhaseProperties()
Resets the phase properties
FireResetSkillsEvent()
Invokes the reset skills event
AddOnChangeSkill(Action<EventArgs>)
Adds an on change skill callback
RemoveOnChangeSkill(Action<EventArgs>)
Removes an on change skill callback
UpdateSkillsList()
Updates the skills list
RequireInit([bool])
Initializes the skills settings
Properties
Name
Description
Boolean value indicating if a skill is being activated
Boolean value indicating if a skill is being casted
Boolean value indicating if a non-permanent skill is being executed
Boolean value indicating if a skill is being finished
Last updated