TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.TopDownEngine.StunZone Class Reference

A stun zone will stun any character with a CharacterStun ability entering it. More...

Inheritance diagram for MoreMountains.TopDownEngine.StunZone:
MoreMountains.TopDownEngine.TopDownMonoBehaviour MoreMountains.Tools.MMMonoBehaviour

Public Types

enum  StunModes { Forever , ForDuration }
 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 More...

Public Member Functions

virtual void OnTriggerEnter2D (Collider2D collider)
 When a collision with the player is triggered, we give damage to the player and knock it back.
virtual void OnTriggerEnter (Collider collider)
 On trigger stay, we call our colliding endpoint.

Public Attributes

LayerMask TargetLayerMask
StunModes StunMode = StunModes.ForDuration
 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)
float StunDuration = 2f
 if in ForDuration mode, the duration of the stun in seconds
bool DisableZoneOnStun = true
 whether or not to disable the zone after the stun has happened

Protected Member Functions

virtual void Colliding (GameObject collider)
 When colliding with a gameobject, we make sure it's a target, and if yes, we stun it.

Protected Attributes

Character _character
CharacterStun _characterStun

Detailed Description

A stun zone will stun any character with a CharacterStun ability entering it.

Member Enumeration Documentation

◆ 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 

Member Function Documentation

◆ Colliding()

virtual void MoreMountains.TopDownEngine.StunZone.Colliding ( GameObject collider)
protectedvirtual

When colliding with a gameobject, we make sure it's a target, and if yes, we stun it.

Parameters
collider

◆ OnTriggerEnter()

virtual void MoreMountains.TopDownEngine.StunZone.OnTriggerEnter ( Collider collider)
virtual

On trigger stay, we call our colliding endpoint.

Parameters
collider

On trigger enter, we call our colliding endpoint

Parameters
collider

◆ OnTriggerEnter2D()

virtual void MoreMountains.TopDownEngine.StunZone.OnTriggerEnter2D ( Collider2D collider)
virtual

When a collision with the player is triggered, we give damage to the player and knock it back.

Parameters
colliderwhat's colliding with the object.

On trigger enter 2D, we call our colliding endpoint

Parameters
collider

S

Member Data Documentation

◆ _character

Character MoreMountains.TopDownEngine.StunZone._character
protected

◆ _characterStun

CharacterStun MoreMountains.TopDownEngine.StunZone._characterStun
protected

◆ DisableZoneOnStun

bool MoreMountains.TopDownEngine.StunZone.DisableZoneOnStun = true

whether or not to disable the zone after the stun has happened

◆ StunDuration

float MoreMountains.TopDownEngine.StunZone.StunDuration = 2f

if in ForDuration mode, the duration of the stun in seconds

◆ StunMode

StunModes MoreMountains.TopDownEngine.StunZone.StunMode = StunModes.ForDuration

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.TopDownEngine.StunZone.TargetLayerMask

The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Characters/Weapons/StunZone.cs