Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
ExampleAbilityInfo Class Reference

Detailed Description

This is an example ability with placeholder functionality. Useful for understanding the syntax for the ability system.

Documentation updated 8/13/2024

Author
Roy Pascual
Note
This is a scriptable object, meaning you can make an instance of it in the Unity Editor that exists in the file explorer.

Public Member Functions

override void AbilityUpdate (AbilityOwner abilityOwner)
 Heals the player instantly by damage (from BaseAbilityInfo) repeatedly.
 
override void AbilityDisable (AbilityOwner abilityOwner, AbilityEffectType effectType)
 
virtual void AbilityActivate (AbilityOwner abilityOwner)
 Runs the ability function of the given form.
 
virtual void DisablePassive (AbilityOwner abilityOwner)
 Disables the passive ability if the.
 
virtual void OnEquipped (AbilityOwner abilityOwner)
 Runs when the ability is equipped.
 
virtual void OnUnequipped (AbilityOwner abilityOwner)
 Runs when the abiility is unequipped.
 
void UpgradeAbility ()
 Increases the level by one, unless already at max level.
 
string GetAbilityName (AbilityForm form)
 Returns the name of the given ability form.
 
string GetAbilityDescription (AbilityForm form)
 Returns the description of the given ability form.
 
string[] GetAllAbilityNames ()
 Returns all the names of the abilities in each set.
 
string[] GetAllAbilityDescriptions ()
 Returns all the descriptions of the abilities in each set.
 
string GetQuote ()
 Returns all the god's quote for this ability.
 

Protected Member Functions

override void AbilityOffense (AbilityOwner abilityOwner)
 Spawns a red textbox where the player is standing that says “Offense.”
 
override void AbilityDefense (AbilityOwner abilityOwner)
 Heals the player instantly by damage (from BaseAbilityInfo). Spawns a red textbox where the player is standing that says “Defense.”
 
override void AbilityUtility (AbilityOwner abilityOwner)
 Spawns a red textbox where the player is standing that says “Utility.”
 
override void AbilityPassiveEnable (AbilityOwner abilityOwner)
 Writes "Example Passive" to the console.
 
override void AbilityPassiveDisable (AbilityOwner abilityOwner)
 Placeholder AbilityPassiveDisable.
 
void AbilityOffense (AbilityOwner abilityOwner)
 The functionality for the offense ability goes here!
 
void AbilityDefense (AbilityOwner abilityOwner)
 The functionality for the defense ability goes here!
 
void AbilityUtility (AbilityOwner abilityOwner)
 The functionality for the utility ability goes here!
 
void AbilityPassiveEnable (AbilityOwner abilityOwner)
 The functionality for the passive ability goes here! This function will automatically run when the ability is equipped.
 
void AbilityPassiveDisable (AbilityOwner abilityOwner)
 Use thus function will disable the functionality of the passive ability. This function will automatically run when the ability is unequipped.
 
virtual void ApplyEffects (AbilityOwner abilityOwner, AbilityForm abilityForm, AbilityEffectType applyType)
 Applies all effects for the given ability form.
 
virtual void DisableEffects (AbilityOwner abilityOwner, AbilityForm abilityForm, AbilityEffectType disableType)
 Disables all effects for the given ability form.
 

Private Member Functions

void PlaceholderEffect (AbilityOwner abilityOwner)
 Unused function that spawns an effect where the player is standing.
 

Custom Ability Info

Customize the specifics of how this ability works by setting the references this ability set relies on.

Transform projectilePrefab
 Reference to the prefab that each ability spawns. This is usually set to a test prefab with text the ability tries to change.
 
Transform effectPrefab
 Prefab used by an unused function.
 
GameObject tempAbilitySpawn
 Reference to a game object an ability has just instantiated.
 

Additional Inherited Members

int abilityID
 A number that is used to identify the ability info object, usually to determine if two ability infos are the same.
 
string abilityName = "DEFAULT_ABILITY"
 A string that is used to identify the ability, as well as display its name in UIs.
 
Sprite overlapIcon
 Sprite used to represent the ability in UI elements, such as the ability inventory and ability hotbar.
 
List< Sprite > abilityIcons
 The icons for each of the ability’s forms: offense, defense, utility, and passive.
 
EventReference onCooldownSound
 Reference to the sound that plays when the player tries to use an ability that's currently on cooldown.
 
int abilityLevel = 0
 Current level of the ability. The ability is locked at level 0.
 
int maxLevel = 3
 The maximum level the ability can be upgraded to.
 
List< int > upgradeSoulCosts
 The soul cost of the upgrades for the ability at each level.
 
List< int > upgradeGodsoulCosts
 The godsoul cost of the upgrades for the ability at each level.
 
AbilityForm currentForm
 Which of the 4 abilities in the set are currently in use.
 
int baseCost = 0
 Unimplemented feature that would see abilities cost a currency to use.
 
float duration = 0f
 How long (in seconds) the ability should last for.
 
float tickRate = 0f
 How many times a second AbilityUpdate() is run. Use for things like repeatedly regenerating health.
 
float chargeUp = 0f
 How long (in seconds) the ability’s charge up should last for.
 
float cooldown = 0f
 How long (in seconds) the ability’s cooldown should last for.
 
int damage = 0
 Unimplemented feature that's occasionally used when an ability needs a damage value.
 
List< AbilityEffectoffenseEffects
 List of effects the offense ability will trigger.
 
List< AbilityEffectdefenseEffects
 List of effects the defense ability will trigger.
 
List< AbilityEffectutilityEffects
 List of effects the utility ability will trigger.
 
List< AbilityEffectpassiveEffects
 List of effects the passive ability will trigger.
 

Member Function Documentation

◆ AbilityDefense()

override void ExampleAbilityInfo.AbilityDefense ( AbilityOwner abilityOwner)
protected

Heals the player instantly by damage (from BaseAbilityInfo). Spawns a red textbox where the player is standing that says “Defense.”

◆ AbilityDisable()

override void ExampleAbilityInfo.AbilityDisable ( AbilityOwner abilityOwner,
AbilityEffectType effectType )
virtual

Calls base version of this function (doesn’t need to be included)

Deprecated
Since this function just calls the base version of itself, it can just be removed.

Reimplemented from BaseAbilityInfo.

◆ AbilityOffense()

override void ExampleAbilityInfo.AbilityOffense ( AbilityOwner abilityOwner)
protected

Spawns a red textbox where the player is standing that says “Offense.”

◆ AbilityPassiveDisable()

override void ExampleAbilityInfo.AbilityPassiveDisable ( AbilityOwner abilityOwner)
protected

Placeholder AbilityPassiveDisable.

◆ AbilityPassiveEnable()

override void ExampleAbilityInfo.AbilityPassiveEnable ( AbilityOwner abilityOwner)
protected

Writes "Example Passive" to the console.

◆ AbilityUpdate()

override void ExampleAbilityInfo.AbilityUpdate ( AbilityOwner abilityOwner)
virtual

Heals the player instantly by damage (from BaseAbilityInfo) repeatedly.

Reimplemented from BaseAbilityInfo.

◆ AbilityUtility()

override void ExampleAbilityInfo.AbilityUtility ( AbilityOwner abilityOwner)
protected

Spawns a red textbox where the player is standing that says “Utility.”

◆ PlaceholderEffect()

void ExampleAbilityInfo.PlaceholderEffect ( AbilityOwner abilityOwner)
private

Unused function that spawns an effect where the player is standing.

Member Data Documentation

◆ effectPrefab

Transform ExampleAbilityInfo.effectPrefab

Prefab used by an unused function.

◆ projectilePrefab

Transform ExampleAbilityInfo.projectilePrefab

Reference to the prefab that each ability spawns. This is usually set to a test prefab with text the ability tries to change.

◆ tempAbilitySpawn

GameObject ExampleAbilityInfo.tempAbilitySpawn
private

Reference to a game object an ability has just instantiated.


The documentation for this class was generated from the following file: