Add this script to an object and it will automatically be reactivated and revived when the player respawns.
More...
|
| delegate void | OnReviveDelegate () |
| virtual void | OnPlayerRespawn (CheckPoint checkpoint, Character player) |
| | When the player respawns, we reinstate this agent.
|
| virtual void | Kill () |
| | Kills this object, turning its parts off based on the settings set in the inspector.
|
| virtual void | Revive () |
| | Revives this object, turning its parts back on again.
|
|
| virtual void | Start () |
| | On Start we grab our various components.
|
| virtual void | Update () |
| | On Update we check whether we should be reviving this agent.
|
| virtual void | InstantiateRespawnEffect () |
| | Instantiates the respawn effect at the object's position.
|
| virtual void | PlayRespawnSound () |
| | Plays the respawn sound.
|
Add this script to an object and it will automatically be reactivated and revived when the player respawns.
◆ InstantiateRespawnEffect()
| virtual void MoreMountains.TopDownEngine.AutoRespawn.InstantiateRespawnEffect |
( |
| ) |
|
|
protectedvirtual |
Instantiates the respawn effect at the object's position.
◆ Kill()
| virtual void MoreMountains.TopDownEngine.AutoRespawn.Kill |
( |
| ) |
|
|
virtual |
Kills this object, turning its parts off based on the settings set in the inspector.
◆ OnPlayerRespawn()
| virtual void MoreMountains.TopDownEngine.AutoRespawn.OnPlayerRespawn |
( |
CheckPoint | checkpoint, |
|
|
Character | player ) |
|
virtual |
◆ OnReviveDelegate()
| delegate void MoreMountains.TopDownEngine.AutoRespawn.OnReviveDelegate |
( |
| ) |
|
◆ PlayRespawnSound()
| virtual void MoreMountains.TopDownEngine.AutoRespawn.PlayRespawnSound |
( |
| ) |
|
|
protectedvirtual |
◆ Revive()
| virtual void MoreMountains.TopDownEngine.AutoRespawn.Revive |
( |
| ) |
|
|
virtual |
Revives this object, turning its parts back on again.
◆ Start()
| virtual void MoreMountains.TopDownEngine.AutoRespawn.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we grab our various components.
◆ Update()
| virtual void MoreMountains.TopDownEngine.AutoRespawn.Update |
( |
| ) |
|
|
protectedvirtual |
On Update we check whether we should be reviving this agent.
◆ _aiBrain
| AIBrain MoreMountains.TopDownEngine.AutoRespawn._aiBrain |
|
protected |
◆ _character
| Character MoreMountains.TopDownEngine.AutoRespawn._character |
|
protected |
◆ _collider2D
| Collider2D MoreMountains.TopDownEngine.AutoRespawn._collider2D |
|
protected |
◆ _firstRespawn
| bool MoreMountains.TopDownEngine.AutoRespawn._firstRespawn = true |
|
protected |
◆ _health
| Health MoreMountains.TopDownEngine.AutoRespawn._health |
|
protected |
◆ _initialPosition
| Vector3 MoreMountains.TopDownEngine.AutoRespawn._initialPosition |
|
protected |
◆ _otherComponents
| MonoBehaviour [] MoreMountains.TopDownEngine.AutoRespawn._otherComponents |
|
protected |
◆ _renderer
| Renderer MoreMountains.TopDownEngine.AutoRespawn._renderer |
|
protected |
◆ _reviving
| bool MoreMountains.TopDownEngine.AutoRespawn._reviving = false |
|
protected |
◆ _timeOfDeath
| float MoreMountains.TopDownEngine.AutoRespawn._timeOfDeath = 0f |
|
protected |
◆ AssociatedCheckpoints
| List<CheckPoint> MoreMountains.TopDownEngine.AutoRespawn.AssociatedCheckpoints |
if the player respawns at these checkpoints, the object will be respawned
◆ AutoRespawnAmount
| int MoreMountains.TopDownEngine.AutoRespawn.AutoRespawnAmount = 3 |
the amount of times this object can auto respawn
◆ AutoRespawnDuration
| float MoreMountains.TopDownEngine.AutoRespawn.AutoRespawnDuration = 0f |
if this has a value superior to 0, this object will respawn at its last position X seconds after its death
◆ AutoRespawnRemainingAmount
| int MoreMountains.TopDownEngine.AutoRespawn.AutoRespawnRemainingAmount = 3 |
the remaining amounts of respawns (readonly, controlled by the class at runtime)
◆ DisableAllComponentsOnKill
| bool MoreMountains.TopDownEngine.AutoRespawn.DisableAllComponentsOnKill = false |
if this is true, all components on this object will be disabled on kill
◆ DisableGameObjectOnKill
| bool MoreMountains.TopDownEngine.AutoRespawn.DisableGameObjectOnKill = true |
if this is true, this gameobject will be disabled on kill
◆ IgnoreCheckpointsAlwaysRespawn
| bool MoreMountains.TopDownEngine.AutoRespawn.IgnoreCheckpointsAlwaysRespawn = true |
if this is true, the object will always respawn, whether or not it's associated to a checkpoint
◆ OnRevive
◆ OnReviveEvent
| UnityEvent MoreMountains.TopDownEngine.AutoRespawn.OnReviveEvent |
a Unity Event to trigger when respawning
◆ RepositionToInitOnPlayerRespawn
| bool MoreMountains.TopDownEngine.AutoRespawn.RepositionToInitOnPlayerRespawn = false |
if this is true, this object will be repositioned at its initial position when the player revives
◆ RespawnEffect
| GameObject MoreMountains.TopDownEngine.AutoRespawn.RespawnEffect |
the effect to instantiate when the player respawns
◆ RespawnOnPlayerRespawn
| bool MoreMountains.TopDownEngine.AutoRespawn.RespawnOnPlayerRespawn = true |
if this is true, this object will respawn at its last position when the player revives
◆ RespawnSfx
| AudioClip MoreMountains.TopDownEngine.AutoRespawn.RespawnSfx |
the sfx to play when the player respawns
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Spawn/AutoRespawn.cs