TopDown Engine v4.3
MoreMountains.TopDownEngine.ProximityMine Class Reference

Add this class to a collider (2D or 3D) and it'll let you trigger things after a duration, like a mine would. It also comes with options to interrupt or reset the timer on exit. More...

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

Public Member Functions

virtual void Initialization ()
 On init we initialize our feedbacks and duration More...
 
virtual void TriggerMine ()
 Describes what happens when the mine explodes 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...
 
virtual void OnTriggerStay (Collider collider)
 On trigger stay, we call our colliding endpoint More...
 
virtual void OnTriggerEnter (Collider collider)
 On trigger enter, we call our colliding endpoint More...
 
virtual void OnTriggerExit (Collider collider)
 On trigger enter, we call our colliding endpoint More...
 
virtual void OnTriggerExit2D (Collider2D collider)
 On trigger enter 2D, we call our colliding endpoint More...
 

Public Attributes

LayerMask TargetLayerMask
 the layers that will trigger this mine More...
 
bool DisableMineOnTrigger = true
 whether or not to disable the mine when it triggers/explodes More...
 
float WarningDuration = 2f
 the duration of the warning phase, in seconds, betfore the mine triggers More...
 
bool WarningStopsOnExit = false
 whether or not the warning should stop when exiting the zone More...
 
bool WarningDurationResetsOnExit = false
 whether or not the warning duration should reset when exiting the zone More...
 
float TimeLeftBeforeTrigger
 a read only display of the current duration before explosion More...
 
MMFeedbacks OnWarningStartsFeedbacks
 the feedback to play when the warning phase starts More...
 
MMFeedbacks OnWarningStopsFeedbacks
 a feedback to play when the warning phase stops More...
 
MMFeedbacks OnWarningResetFeedbacks
 a feedback to play when the warning phase is reset More...
 
MMFeedbacks OnMineTriggerFeedbacks
 a feedback to play when the mine triggers More...
 

Protected Member Functions

virtual void Start ()
 On Start we initialize our mine More...
 
virtual void Colliding (GameObject collider)
 When colliding, we start our timer if needed More...
 
virtual void Exiting (GameObject collider)
 When exiting, we stop our timer if needed More...
 
virtual void Update ()
 On Update if a target is inside the zone, we update our timer More...
 

Protected Attributes

bool _inside = false
 

Detailed Description

Add this class to a collider (2D or 3D) and it'll let you trigger things after a duration, like a mine would. It also comes with options to interrupt or reset the timer on exit.

Member Function Documentation

◆ Colliding()

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

When colliding, we start our timer if needed

Parameters
collider

◆ Exiting()

virtual void MoreMountains.TopDownEngine.ProximityMine.Exiting ( GameObject  collider)
protectedvirtual

When exiting, we stop our timer if needed

Parameters
collider

◆ Initialization()

virtual void MoreMountains.TopDownEngine.ProximityMine.Initialization ( )
virtual

On init we initialize our feedbacks and duration

◆ OnTriggerEnter()

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

On trigger enter, we call our colliding endpoint

Parameters
collider

◆ OnTriggerEnter2D()

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

On trigger enter 2D, we call our colliding endpoint

Parameters
collider

S

◆ OnTriggerExit()

virtual void MoreMountains.TopDownEngine.ProximityMine.OnTriggerExit ( Collider  collider)
virtual

On trigger enter, we call our colliding endpoint

Parameters
collider

◆ OnTriggerExit2D()

virtual void MoreMountains.TopDownEngine.ProximityMine.OnTriggerExit2D ( Collider2D  collider)
virtual

On trigger enter 2D, we call our colliding endpoint

Parameters
collider

S

◆ OnTriggerStay()

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

On trigger stay, we call our colliding endpoint

Parameters
collider

◆ OnTriggerStay2D()

virtual void MoreMountains.TopDownEngine.ProximityMine.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.

◆ Start()

virtual void MoreMountains.TopDownEngine.ProximityMine.Start ( )
protectedvirtual

On Start we initialize our mine

◆ TriggerMine()

virtual void MoreMountains.TopDownEngine.ProximityMine.TriggerMine ( )
virtual

Describes what happens when the mine explodes

◆ Update()

virtual void MoreMountains.TopDownEngine.ProximityMine.Update ( )
protectedvirtual

On Update if a target is inside the zone, we update our timer

Member Data Documentation

◆ _inside

bool MoreMountains.TopDownEngine.ProximityMine._inside = false
protected

◆ DisableMineOnTrigger

bool MoreMountains.TopDownEngine.ProximityMine.DisableMineOnTrigger = true

whether or not to disable the mine when it triggers/explodes

◆ OnMineTriggerFeedbacks

MMFeedbacks MoreMountains.TopDownEngine.ProximityMine.OnMineTriggerFeedbacks

a feedback to play when the mine triggers

◆ OnWarningResetFeedbacks

MMFeedbacks MoreMountains.TopDownEngine.ProximityMine.OnWarningResetFeedbacks

a feedback to play when the warning phase is reset

◆ OnWarningStartsFeedbacks

MMFeedbacks MoreMountains.TopDownEngine.ProximityMine.OnWarningStartsFeedbacks

the feedback to play when the warning phase starts

◆ OnWarningStopsFeedbacks

MMFeedbacks MoreMountains.TopDownEngine.ProximityMine.OnWarningStopsFeedbacks

a feedback to play when the warning phase stops

◆ TargetLayerMask

LayerMask MoreMountains.TopDownEngine.ProximityMine.TargetLayerMask

the layers that will trigger this mine

◆ TimeLeftBeforeTrigger

float MoreMountains.TopDownEngine.ProximityMine.TimeLeftBeforeTrigger

a read only display of the current duration before explosion

◆ WarningDuration

float MoreMountains.TopDownEngine.ProximityMine.WarningDuration = 2f

the duration of the warning phase, in seconds, betfore the mine triggers

◆ WarningDurationResetsOnExit

bool MoreMountains.TopDownEngine.ProximityMine.WarningDurationResetsOnExit = false

whether or not the warning duration should reset when exiting the zone

◆ WarningStopsOnExit

bool MoreMountains.TopDownEngine.ProximityMine.WarningStopsOnExit = false

whether or not the warning should stop when exiting the zone


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