Enemy AI which looks left and right until it sees a character at which point it charges at the character.
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 looks left and right until it sees a character at which point it charges at the character.
◆ Decide()
override EnemyState PlatformerPro.EnemyAI_SeeAndCharge.Decide |
( |
| ) |
|
|
virtual |
◆ Init()
override void PlatformerPro.EnemyAI_SeeAndCharge.Init |
( |
Enemy |
enemy | ) |
|
|
virtual |
◆ Sense()
override bool PlatformerPro.EnemyAI_SeeAndCharge.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.
◆ changeSightDirection
int PlatformerPro.EnemyAI_SeeAndCharge.changeSightDirection |
How frequently does the AI change the direciton it is looking in. 0 For not at all.
◆ chargeTime
float PlatformerPro.EnemyAI_SeeAndCharge.chargeTime |
How long to keep charging at player before going back to sight mode.
◆ chargeTimer
float PlatformerPro.EnemyAI_SeeAndCharge.chargeTimer |
|
protected |
Counts down from shootStateTime when the player is seen. When non zero the character will be in the shooting state.
◆ myTransform
Transform PlatformerPro.EnemyAI_SeeAndCharge.myTransform |
|
protected |
Cached transform reference.
◆ offset
Vector3 PlatformerPro.EnemyAI_SeeAndCharge.offset |
|
protected |
Store the offset to apply to the sight raycast.
◆ sightDistance
float PlatformerPro.EnemyAI_SeeAndCharge.sightDistance |
How far can the enemy see?
◆ sightLayers
LayerMask PlatformerPro.EnemyAI_SeeAndCharge.sightLayers |
Layers to check for obstacle and characters.
◆ yOffset
float PlatformerPro.EnemyAI_SeeAndCharge.yOffset |
Y position of the characters 'eyes'.
The documentation for this class was generated from the following file: