Add this class to a TRIGGER collider2D and it'll let you know when a character enters it and will let you trigger actions in consequence
More...
|
bool | RequiresPlayer = true |
| It this is true, the character will have to be tagged Player for this to work. More...
|
|
bool | CharacterInArea = false |
| if this is true, a character (and possibly a player based on the setting above) is in the area More...
|
|
UnityEvent | OnEnter |
| a UnityEvent to fire when the targeted character enters the area More...
|
|
UnityEvent | OnStay |
| a UnityEvent to fire while the targeted character stays in the area More...
|
|
UnityEvent | OnExit |
| a UnityEvent to fire when the targeted character exits the area More...
|
|
|
virtual void | Start () |
| On Start we grab our collider2D and set it to trigger in case we forgot AGAIN to set it to trigger More...
|
|
virtual void | OnTriggerEnter2D (Collider2D collider) |
| When a character enters we turn our state to true More...
|
|
virtual void | OnTriggerStay2D (Collider2D collider) |
| While a character stays we keep our boolean true More...
|
|
virtual void | OnTriggerExit2D (Collider2D collider) |
| When a character exits we reset our boolean More...
|
|
virtual bool | TargetFound (Collider2D collider) |
| Returns true if the collider set in parameter is the targeted type, false otherwise More...
|
|
Add this class to a TRIGGER collider2D and it'll let you know when a character enters it and will let you trigger actions in consequence
◆ OnTriggerEnter2D()
virtual void MoreMountains.CorgiEngine.CharacterDetector.OnTriggerEnter2D |
( |
Collider2D |
collider | ) |
|
|
protectedvirtual |
When a character enters we turn our state to true
- Parameters
-
◆ OnTriggerExit2D()
virtual void MoreMountains.CorgiEngine.CharacterDetector.OnTriggerExit2D |
( |
Collider2D |
collider | ) |
|
|
protectedvirtual |
When a character exits we reset our boolean
- Parameters
-
◆ OnTriggerStay2D()
virtual void MoreMountains.CorgiEngine.CharacterDetector.OnTriggerStay2D |
( |
Collider2D |
collider | ) |
|
|
protectedvirtual |
While a character stays we keep our boolean true
- Parameters
-
◆ Start()
virtual void MoreMountains.CorgiEngine.CharacterDetector.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we grab our collider2D and set it to trigger in case we forgot AGAIN to set it to trigger
◆ TargetFound()
virtual bool MoreMountains.CorgiEngine.CharacterDetector.TargetFound |
( |
Collider2D |
collider | ) |
|
|
protectedvirtual |
Returns true if the collider set in parameter is the targeted type, false otherwise
- Parameters
-
- Returns
◆ _character
Character MoreMountains.CorgiEngine.CharacterDetector._character |
|
protected |
◆ _collider2D
Collider2D MoreMountains.CorgiEngine.CharacterDetector._collider2D |
|
protected |
◆ CharacterInArea
bool MoreMountains.CorgiEngine.CharacterDetector.CharacterInArea = false |
if this is true, a character (and possibly a player based on the setting above) is in the area
◆ OnEnter
UnityEvent MoreMountains.CorgiEngine.CharacterDetector.OnEnter |
a UnityEvent to fire when the targeted character enters the area
◆ OnExit
UnityEvent MoreMountains.CorgiEngine.CharacterDetector.OnExit |
a UnityEvent to fire when the targeted character exits the area
◆ OnStay
UnityEvent MoreMountains.CorgiEngine.CharacterDetector.OnStay |
a UnityEvent to fire while the targeted character stays in the area
◆ RequiresPlayer
bool MoreMountains.CorgiEngine.CharacterDetector.RequiresPlayer = true |
It this is true, the character will have to be tagged Player for this to work.
The documentation for this class was generated from the following file: