Enemy AI which runs a default movement until damage at which point it hides. Optionally if hit while hiding it can enter a charge state.
More...
|
override void | Init (Enemy enemy) |
| Init this enemy AI. More...
|
|
override bool | Sense () |
| The sense routine used to detect when something changes. In this case cast a ray from the transform in the facing direction to look for the player. More...
|
|
override EnemyState | Decide () |
| Decide the next move. More...
|
|
override DamageInfo | DoDamage (DamageInfo info) |
| Used to inform the AI we were damaged so an action like HIDE may be triggered. More...
|
|
virtual bool | UpdateTimer () |
| Update the timer by frame time, we drive this externally so we can halt the mob from a single place (the Enemy script). More...
|
|
virtual void | StateTransitioned () |
| Called to tell the AI that we were able to handle the desired state. More...
|
|
virtual void | StateNotTransitioned () |
| Called to tell the AI that we were not able to handle the desired state. Usually due to a movement that wont release control. More...
|
|
virtual void | Message (string message) |
| Handle a message sent to the enemy. More...
|
|
virtual void | Validate (PlatformerProMonoBehaviour myTarget) |
| Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More...
|
|
|
float | hideStateTime = 5.0f |
| How long after being damaged does the enemy hide for. More...
|
|
bool | useChargeState |
| If true then the enemy will go into a charge state after being hit when hiding. More...
|
|
float | decisionInterval |
| How long between decisions, increasing this improves performance but makes the enemy less responsive. More...
|
|
|
override string | ExtraSaveData [get, set] |
| If we are going to save the enemy, this data will be saved if save state is enabled. More...
|
|
virtual string | ExtraSaveData [get, set] |
| If we are going to save the enemy, this data will be saved if save state is enabled. More...
|
|
virtual string | Header [get] |
| Gets the header string used to describe the component. More...
|
|
virtual string | DocLink [get] |
| Gets a link to documentation site. More...
|
|
virtual string | VideoLink [get] |
| Gets a link to a youtube video. More...
|
|
virtual string | Deprecated [get] |
| If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More...
|
|
Enemy AI which runs a default movement until damage at which point it hides. Optionally if hit while hiding it can enter a charge state.
◆ Decide()
override EnemyState PlatformerPro.EnemyAI_HideOnDamage.Decide |
( |
| ) |
|
|
virtual |
◆ DoDamage()
Used to inform the AI we were damaged so an action like HIDE may be triggered.
Reimplemented from PlatformerPro.EnemyAI.
◆ EnemyDamaged()
virtual void PlatformerPro.EnemyAI_HideOnDamage.EnemyDamaged |
( |
object |
sender, |
|
|
DamageInfoEventArgs |
args |
|
) |
| |
|
protectedvirtual |
When enemy is damaged keep hiding!
- Parameters
-
sender | Sender. |
args | Arguments. |
◆ Init()
override void PlatformerPro.EnemyAI_HideOnDamage.Init |
( |
Enemy |
enemy | ) |
|
|
virtual |
◆ Sense()
override bool PlatformerPro.EnemyAI_HideOnDamage.Sense |
( |
| ) |
|
|
virtual |
The sense routine used to detect when something changes. In this case cast a ray from the transform in the facing direction to look for the player.
Reimplemented from PlatformerPro.EnemyAI.
◆ characterHitBox
Optional cached copy of a cahracter hurt box enabling the enemy to collect coins and cause damage to other enemies.
◆ chargeMovement
Cached reference to a charge movement which we need to be able to set the direction on.
◆ hideStateTime
float PlatformerPro.EnemyAI_HideOnDamage.hideStateTime = 5.0f |
How long after being damaged does the enemy hide for.
◆ hideStateTimer
float PlatformerPro.EnemyAI_HideOnDamage.hideStateTimer |
|
protected |
Counts down from hideStateTime when the enemy hides.
◆ isCharging
bool PlatformerPro.EnemyAI_HideOnDamage.isCharging |
|
protected |
Are we currently charging?
◆ useChargeState
bool PlatformerPro.EnemyAI_HideOnDamage.useChargeState |
If true then the enemy will go into a charge state after being hit when hiding.
◆ ExtraSaveData
override string PlatformerPro.EnemyAI_HideOnDamage.ExtraSaveData |
|
getset |
If we are going to save the enemy, this data will be saved if save state is enabled.
The documentation for this class was generated from the following file: