|
| Modes | Mode = Modes.Layer |
| List< Health > | TargetsList |
| | a list of Health components on the targets. Once all these targets are dead, OnLastDeath will trigger
|
| LayerMask | TargetLayerMask = LayerManager.EnemiesLayerMask |
| | the layer(s) on which the dying Health components should be to be counted - typically Enemies
|
| bool | AutoSetKillThreshold = true |
| | in Layer mode, if AutoSetKillThreshold is true, the KillThreshold will be automatically computed on start, based on the total number of potential targets in the level matching the target layer mask
|
| int | DeathThreshold = 5 |
| | The maximum amount of kills needed to trigger OnLastDeath.
|
| int | RemainingDeaths = 0 |
| | The amount of deaths remaining to trigger OnLastDeath. Read only value.
|
| UnityEvent | OnDeath |
| | An event that gets triggered on every death.
|
| UnityEvent | OnLastDeath |
| | An event that gets triggered when the last death occurs.
|
| Text | TotalCounter |
| | An optional text counter displaying the total amount of deaths required before OnLastDeath triggers.
|
| Text | RemainingCounter |
| | An optional text counter displaying the remaining amount of deaths before OnLastDeath.
|
|
| virtual void | Start () |
| | On start we initialize our remaining deaths counter.
|
| virtual void | UpdateTexts () |
| | Updates the bound texts if necessary.
|
| virtual void | OnEnable () |
| | OnDisable, we start listening to events.
|
| virtual void | OnDisable () |
| | OnDisable, we stop listening to events.
|
| virtual void | Awake () |
| | On awake, we initialize our instance. Make sure to call base.Awake() in override if you need awake.
|
| virtual void | InitializeSingleton () |
| | Initializes the singleton.
|
◆ Modes
◆ ComputeKillThresholdBasedOnTargetLayerMask()
| virtual void MoreMountains.TopDownEngine.KillsManager.ComputeKillThresholdBasedOnTargetLayerMask |
( |
| ) |
|
|
virtual |
Computes the required death threshold based by counting objects on the selected layer mask.
◆ InitializeStatics()
| void MoreMountains.TopDownEngine.KillsManager.InitializeStatics |
( |
| ) |
|
|
staticprotected |
Statics initialization to support enter play modes.
◆ OnDisable()
| virtual void MoreMountains.TopDownEngine.KillsManager.OnDisable |
( |
| ) |
|
|
protectedvirtual |
OnDisable, we stop listening to events.
◆ OnEnable()
| virtual void MoreMountains.TopDownEngine.KillsManager.OnEnable |
( |
| ) |
|
|
protectedvirtual |
OnDisable, we start listening to events.
◆ OnMMEvent()
| virtual void MoreMountains.TopDownEngine.KillsManager.OnMMEvent |
( |
MMLifeCycleEvent | lifeCycleEvent | ) |
|
|
virtual |
When we get a death even.
- Parameters
-
◆ RefreshRemainingDeaths()
| virtual void MoreMountains.TopDownEngine.KillsManager.RefreshRemainingDeaths |
( |
| ) |
|
|
virtual |
Use this method to change the current death threshold. This will also update the remaining death counter.
- Parameters
-
◆ Start()
| virtual void MoreMountains.TopDownEngine.KillsManager.Start |
( |
| ) |
|
|
protectedvirtual |
On start we initialize our remaining deaths counter.
◆ UpdateTexts()
| virtual void MoreMountains.TopDownEngine.KillsManager.UpdateTexts |
( |
| ) |
|
|
protectedvirtual |
Updates the bound texts if necessary.
◆ AutoSetKillThreshold
| bool MoreMountains.TopDownEngine.KillsManager.AutoSetKillThreshold = true |
in Layer mode, if AutoSetKillThreshold is true, the KillThreshold will be automatically computed on start, based on the total number of potential targets in the level matching the target layer mask
◆ DeathThreshold
| int MoreMountains.TopDownEngine.KillsManager.DeathThreshold = 5 |
The maximum amount of kills needed to trigger OnLastDeath.
◆ Mode
◆ OnDeath
| UnityEvent MoreMountains.TopDownEngine.KillsManager.OnDeath |
An event that gets triggered on every death.
◆ OnLastDeath
| UnityEvent MoreMountains.TopDownEngine.KillsManager.OnLastDeath |
An event that gets triggered when the last death occurs.
◆ RemainingCounter
| Text MoreMountains.TopDownEngine.KillsManager.RemainingCounter |
An optional text counter displaying the remaining amount of deaths before OnLastDeath.
◆ RemainingDeaths
| int MoreMountains.TopDownEngine.KillsManager.RemainingDeaths = 0 |
The amount of deaths remaining to trigger OnLastDeath. Read only value.
◆ TargetLayerMask
| LayerMask MoreMountains.TopDownEngine.KillsManager.TargetLayerMask = LayerManager.EnemiesLayerMask |
the layer(s) on which the dying Health components should be to be counted - typically Enemies
◆ TargetsList
| List<Health> MoreMountains.TopDownEngine.KillsManager.TargetsList |
a list of Health components on the targets. Once all these targets are dead, OnLastDeath will trigger
◆ TotalCounter
| Text MoreMountains.TopDownEngine.KillsManager.TotalCounter |
An optional text counter displaying the total amount of deaths required before OnLastDeath triggers.
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Managers/KillsManager.cs