TopDown Engine  v4.2
MoreMountains.TopDownEngine.KillZone Class Reference

Add this component to an object and it will cause damage to objects that collide with it. More...

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

Public Member Functions

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)
 when something enters our zone, we call our colliding endpoint More...
 
virtual void OnTriggerStay (Collider collider)
 when something stays in the zone, we call our colliding endpoint More...
 
virtual void OnTriggerEnter (Collider collider)
 When something enters our zone, we call our colliding endpoint More...
 

Public Attributes

LayerMask TargetLayerMask = LayerManager.PlayerLayerMask
 

Protected Member Functions

virtual void Awake ()
 Initialization More...
 
virtual void OnEnable ()
 OnEnable we set the start time to the current timestamp More...
 
virtual void Colliding (GameObject collider)
 When colliding, we kill our collider if it's a Health equipped object More...
 

Protected Attributes

Health _colliderHealth
 

Detailed Description

Add this component to an object and it will cause damage to objects that collide with it.

Member Function Documentation

◆ Awake()

virtual void MoreMountains.TopDownEngine.KillZone.Awake ( )
protectedvirtual

Initialization

◆ Colliding()

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

When colliding, we kill our collider if it's a Health equipped object

Parameters
collider

◆ OnEnable()

virtual void MoreMountains.TopDownEngine.KillZone.OnEnable ( )
protectedvirtual

OnEnable we set the start time to the current timestamp

◆ OnTriggerEnter()

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

When something enters our zone, we call our colliding endpoint

Parameters
collider

◆ OnTriggerEnter2D()

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

when something enters our zone, we call our colliding endpoint

Parameters
collider

◆ OnTriggerStay()

virtual void MoreMountains.TopDownEngine.KillZone.OnTriggerStay ( Collider  collider)
virtual

when something stays in the zone, we call our colliding endpoint

Parameters
collider

◆ OnTriggerStay2D()

virtual void MoreMountains.TopDownEngine.KillZone.OnTriggerStay2D ( 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.

Member Data Documentation

◆ _colliderHealth

Health MoreMountains.TopDownEngine.KillZone._colliderHealth
protected

◆ TargetLayerMask

LayerMask MoreMountains.TopDownEngine.KillZone.TargetLayerMask = LayerManager.PlayerLayerMask

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