CardRPG 1.0
 
Loading...
Searching...
No Matches
CardRPG.EffectSlot< T > Class Template Reference

A slot for hanging effects that can be applied to a Dueler. More...

Inheritance diagram for CardRPG.EffectSlot< T >:
CardRPG.TriggerEffectSlot< T >

Public Member Functions

IEnumerator AddEffect (Dueler dueler, T effect)
 Adds an effect to the slot for the specified Dueler.
 
IEnumerator RemoveEffect (Dueler dueler, T effect)
 Removes an effect from the slot for the specified Dueler.
 
List< T > GetEffects< T1 > ()
 Gets all effects of a specific type from the slot.
 
List< T > GetNegativeEffects ()
 Gets all negative effects.
 
IEnumerator RemoveNegativeEffects (Dueler dueler, int count)
 Removes a specified number of negative effects from the Dueler.
 
List< T > GetPositiveEffects ()
 Gets all positive effects.
 
IEnumerator RemovePositiveEffects (Dueler dueler, int count)
 Removes a specified number of positive effects from the Dueler.
 
void Clear (Dueler dueler)
 Clears all effects from the slot for the specified Dueler.
 

Public Attributes

UnityEvent< T > OnApply = new()
 Triggers when an effect is applied.
 
UnityEvent< T > OnRemove = new()
 Triggers when an effect is removed.
 

Protected Attributes

readonly List< T > Effects = new()
 

Detailed Description

A slot for hanging effects that can be applied to a Dueler.

Template Parameters
T
Type Constraints
T :IHangingEffect 

Member Function Documentation

◆ AddEffect()

IEnumerator CardRPG.EffectSlot< T >.AddEffect ( Dueler dueler,
T effect )
inline

Adds an effect to the slot for the specified Dueler.

Parameters
dueler
effect
Returns

◆ Clear()

void CardRPG.EffectSlot< T >.Clear ( Dueler dueler)
inline

Clears all effects from the slot for the specified Dueler.

Parameters
dueler

◆ GetEffects< T1 >()

List< T > CardRPG.EffectSlot< T >.GetEffects< T1 > ( )
inline

Gets all effects of a specific type from the slot.

Template Parameters
T1
Returns
Type Constraints
T1 :IHangingEffect 

◆ GetNegativeEffects()

List< T > CardRPG.EffectSlot< T >.GetNegativeEffects ( )
inline

Gets all negative effects.

Returns

◆ GetPositiveEffects()

List< T > CardRPG.EffectSlot< T >.GetPositiveEffects ( )
inline

Gets all positive effects.

Returns

◆ RemoveEffect()

IEnumerator CardRPG.EffectSlot< T >.RemoveEffect ( Dueler dueler,
T effect )
inline

Removes an effect from the slot for the specified Dueler.

Parameters
dueler
effect
Returns

◆ RemoveNegativeEffects()

IEnumerator CardRPG.EffectSlot< T >.RemoveNegativeEffects ( Dueler dueler,
int count )
inline

Removes a specified number of negative effects from the Dueler.

Parameters
dueler
count
Returns

◆ RemovePositiveEffects()

IEnumerator CardRPG.EffectSlot< T >.RemovePositiveEffects ( Dueler dueler,
int count )
inline

Removes a specified number of positive effects from the Dueler.

Parameters
dueler
count
Returns

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