AbilityManager - digocorbellini/EGaDS-Open-Project GitHub Wiki
AbilityManager
is a component attached to the player. The class holds and manages the abilities the player has.
-
KeyCode[] TRIGGERED_ABILITY_KEY_CODES
: Defines the hotkey for each triggered ability slot -
KeyCode[] PASSIVE_ABILITY_KEY_CODES
: Defines the hotkey for each passive ability slot
-
IList<TriggeredAbility> TriggeredAbilities
: The list of triggered abilities the player holds -
IList<PassiveAbility> PassiveAbilities
: The list of passive abilities the player holds -
float SpeedMultiplier
: The total multiplier applied to left-right movement speed in tiles per second. -
float FallSpeedMultiplier
: The total multiplier applied to maximum fall speed in tiles per second. -
float WallSlideMultiplier
: The total multiplier applied to wall slide speed in tiles per second -
float JumpHeightAddend
: The total number of tiles added to jump height. -
int AirJumpAddend
: The total number of air jumps.
-
bool AcquireFocus(Ability ability)
:
Called by abilities to acquire the focus on themselves. When this is set, calls toAbilityUpdate()
andAbilityFixedUpdate()
of all other abilities will be blocked. See Focus for more info. -
UnacquireFocus(Ability ability)
:
Called by abilities to unaquire focus on themselves.AbilityUpdate()
andAbilityFixedUpdate()
methods of other abilities will begin to be called again. See Focus for more info. -
bool AddAbility(Ability ability, int slotIndex)
:
Addsability
atslotIndex
. The type ofability
will be used to infer which list it will be added to. Returnsfalse
if unable to add the ability. -
TriggeredAbility RemoveTriggeredAbility(int slotIndex)
:
Removes and returns the ability atslotIndex
of the triggered ability list. -
PassiveAbility RemovePassiveAbility(int slotIndex)
:
Removes and returns the ability atslotIndex
of the triggered ability list. -
List<TriggeredAbility> SetTriggeredAbilityCount(int count)
:
Sets the number of triggered ability slots and returns any abilities removed. -
List<PassiveAbility> SetPassiveAbilityCount(int count)
:
Sets the number of passive ability slots and returns any abilities removed.