Show / Hide Table of Contents

Class GameplayAbility

This interfaces defines Gameplay Abilities. Gameplay Abilities represent "things" that players can cast, etc. E.g. a IGameplayAbility might represent a fireball ability which the player casts and which damages a target

Inheritance
System.Object
GameplayAbility
Implements
IGameplayAbility
Namespace: GameplayAbilitySystem.Abilities
Assembly: Assembly-CSharp-firstpass.dll
Syntax
public class GameplayAbility : ScriptableObject, IGameplayAbility

Properties

| Improve this Doc View Source

AbilityLogic

Defines what the ability actually does

Declaration
public AbstractAbilityActivation AbilityLogic { get; }
Property Value
Type Description
AbstractAbilityActivation
| Improve this Doc View Source

GameplayCooldowns

Cooldowns associated with this ability

Declaration
public List<GameplayCooldown> GameplayCooldowns { get; }
Property Value
Type Description
List<GameplayCooldown>
| Improve this Doc View Source

GameplayCost

Cost of using this ability

Declaration
public IGameplayCost GameplayCost { get; }
Property Value
Type Description
IGameplayCost
| Improve this Doc View Source

OnGameplayAbilityCancelled

This is called whenever this ability is cancelled. This event does not pass on details of which IGameplayAbilitySystem was responsible for using this ability.

Declaration
public GenericAbilityEvent OnGameplayAbilityCancelled { get; }
Property Value
Type Description
GenericAbilityEvent
| Improve this Doc View Source

OnGameplayAbilityCommitted

This is called whenever this ability is commited. This event does not pass on details of which IGameplayAbilitySystem was responsible for using this ability.

Declaration
public GenericAbilityEvent OnGameplayAbilityCommitted { get; }
Property Value
Type Description
GenericAbilityEvent
| Improve this Doc View Source

OnGameplayAbilityEnded

This is called whenever this ability ends. This event does not pass on details of which IGameplayAbilitySystem was responsible for using this ability.

Declaration
public GenericAbilityEvent OnGameplayAbilityEnded { get; }
Property Value
Type Description
GenericAbilityEvent
| Improve this Doc View Source

Tags

Tags that this ability has/provides

Declaration
public IAbilityTags Tags { get; }
Property Value
Type Description
IAbilityTags

Methods

| Improve this Doc View Source

AbilityOffCooldown(IGameplayAbilitySystem)

Checks to see if the IGameplayAbilitySystem is off cooldown on the target IGameplayAbilitySystem

Declaration
public bool AbilityOffCooldown(IGameplayAbilitySystem AbilitySystem)
Parameters
Type Name Description
IGameplayAbilitySystem AbilitySystem

The target IGameplayAbilitySystem

Returns
Type Description
System.Boolean
| Improve this Doc View Source

ActivateAbility(IGameplayAbilitySystem)

Activates this ability on the target IGameplayAbilitySystem

Declaration
public virtual void ActivateAbility(IGameplayAbilitySystem AbilitySystem)
Parameters
Type Name Description
IGameplayAbilitySystem AbilitySystem

The target IGameplayAbilitySystem

| Improve this Doc View Source

ApplyCooldown(IGameplayAbilitySystem)

Applies cooldown. Cooldown is applied even if the ability is already on cooldown

Declaration
protected void ApplyCooldown(IGameplayAbilitySystem abilitySystem)
Parameters
Type Name Description
IGameplayAbilitySystem abilitySystem
| Improve this Doc View Source

ApplyCost()

Applies the ability cost, decreasing the specified cost resource from the player. If player doesn't have the required resource, the resource goes to negative (or clamps to 0)

Declaration
protected void ApplyCost()
| Improve this Doc View Source

ApplyGameplayEffectToTarget(GameplayEffect, AbilitySystemComponent)

Declaration
protected void ApplyGameplayEffectToTarget(GameplayEffect effect, AbilitySystemComponent target)
Parameters
Type Name Description
GameplayEffect effect
AbilitySystemComponent target
| Improve this Doc View Source

CommitAbility(IGameplayAbilitySystem)

Commits the IGameplayAbilitySystem on the target IGameplayAbilitySystem

Declaration
public bool CommitAbility(IGameplayAbilitySystem AbilitySystem)
Parameters
Type Name Description
IGameplayAbilitySystem AbilitySystem

The target IGameplayAbilitySystem

Returns
Type Description
System.Boolean
| Improve this Doc View Source

EndAbility(IGameplayAbilitySystem)

Ends this ability on the target IGameplayAbilitySystem

Declaration
public void EndAbility(IGameplayAbilitySystem AbilitySystem)
Parameters
Type Name Description
IGameplayAbilitySystem AbilitySystem

The target IGameplayAbilitySystem

| Improve this Doc View Source

GetAbilityCooldownTags()

The cooldown tags associated with this IGameplayAbility

Declaration
public List<GameplayTag> GetAbilityCooldownTags()
Returns
Type Description
List<GameplayTag>
| Improve this Doc View Source

IsAbilityActivatable(IGameplayAbilitySystem)

Check if this ability can be activated by IGameplayAbilitySystem

Declaration
public virtual bool IsAbilityActivatable(IGameplayAbilitySystem AbilitySystem)
Parameters
Type Name Description
IGameplayAbilitySystem AbilitySystem

The target IGameplayAbilitySystem

Returns
Type Description
System.Boolean
| Improve this Doc View Source

PlayerHasResourceToCast(IGameplayAbilitySystem)

Checks to see if the target IGameplayAbilitySystem has the required resources to cast this ability

Declaration
public bool PlayerHasResourceToCast(IGameplayAbilitySystem AbilitySystem)
Parameters
Type Name Description
IGameplayAbilitySystem AbilitySystem
Returns
Type Description
System.Boolean

True if the target IGameplayAbilitySystem has required resources, false otherwise

Implements

IGameplayAbility
  • Improve this Doc
  • View Source
Back to top Generated by DocFX