A stun zone will stun any character with a CharacterStun ability entering it
More...
|
virtual void | OnTriggerStay2D (Collider2D collider) |
| When a collision with the player is triggered, we give damage to the player and knock it back More...
|
|
virtual void | OnTriggerEnter2D (Collider2D collider) |
| On trigger enter 2D, we call our colliding endpoint More...
|
|
|
void | OnEnable () |
| On enable, we start our disable countdown if necessary More...
|
|
virtual IEnumerator | AutoDisableCo () |
| A coroutine used to disable the zone after a certain duration More...
|
|
virtual void | Colliding (GameObject collider) |
| When colliding with a gameobject, we make sure it's a target, and if yes, we stun it More...
|
|
A stun zone will stun any character with a CharacterStun ability entering it
◆ StunModes
the possible stun modes : Forever : stuns until StunExit is called on the CharacterStun component, ForDuration : stuns for a duration, and then the character will exit stun on its own
Enumerator |
---|
Forever | |
ForDuration | |
◆ AutoDisableCo()
virtual IEnumerator MoreMountains.CorgiEngine.StunZone.AutoDisableCo |
( |
| ) |
|
|
protectedvirtual |
A coroutine used to disable the zone after a certain duration
- Returns
◆ Colliding()
virtual void MoreMountains.CorgiEngine.StunZone.Colliding |
( |
GameObject |
collider | ) |
|
|
protectedvirtual |
When colliding with a gameobject, we make sure it's a target, and if yes, we stun it
- Parameters
-
◆ OnEnable()
void MoreMountains.CorgiEngine.StunZone.OnEnable |
( |
| ) |
|
|
protected |
On enable, we start our disable countdown if necessary
◆ OnTriggerEnter2D()
virtual void MoreMountains.CorgiEngine.StunZone.OnTriggerEnter2D |
( |
Collider2D |
collider | ) |
|
|
virtual |
On trigger enter 2D, we call our colliding endpoint
- Parameters
-
S
◆ OnTriggerStay2D()
virtual void MoreMountains.CorgiEngine.StunZone.OnTriggerStay2D |
( |
Collider2D |
collider | ) |
|
|
virtual |
When a collision with the player is triggered, we give damage to the player and knock it back
- Parameters
-
collider | what's colliding with the object. |
◆ _character
Character MoreMountains.CorgiEngine.StunZone._character |
|
protected |
◆ _characterStun
◆ AutoDisable
bool MoreMountains.CorgiEngine.StunZone.AutoDisable = true |
if this is true, the zone will be disabled after the duration has passed
◆ AutoDisableDuration
float MoreMountains.CorgiEngine.StunZone.AutoDisableDuration = 0.3f |
the duration (in seconds) before the zone auto disables itself
◆ DisableZoneOnStun
bool MoreMountains.CorgiEngine.StunZone.DisableZoneOnStun = true |
whether or not to disable the zone after the stun has happened
◆ StunDuration
float MoreMountains.CorgiEngine.StunZone.StunDuration = 2f |
if in ForDuration mode, the duration of the stun in seconds
◆ StunMode
the chosen stun mode (Forever : stuns until StunExit is called on the CharacterStun component, ForDuration : stuns for a duration, and then the character will exit stun on its own)
◆ TargetLayerMask
LayerMask MoreMountains.CorgiEngine.StunZone.TargetLayerMask |
The documentation for this class was generated from the following file:
- Assets/CorgiEngine/Common/Scripts/Environment/StunZone.cs