Enemy movement which just plays an animation which is mapped to enemy state.
More...
|
override EnemyMovement | Init (Enemy enemy) |
| Initialise this movement and return a reference to the ready to use movement. More...
|
|
override bool | DoMove () |
| Moves the character. More...
|
|
override bool | LosingControl () |
| Called when this movement is losing control. More...
|
|
virtual void | DoDamage (DamageInfo info) |
| Do the damage movement More...
|
|
virtual void | DoDeath (DamageInfo info) |
| Do the death movement More...
|
|
virtual void | GainingControl () |
| Called when this movement is gaining control. More...
|
|
virtual void | SetDirection (Vector2 direction) |
| Often a movement will need some kind of direction information such as where the cahracter is in relation to the enemy. Use this to set that information. Note there is no specific rule for what that information is, it could be anything. More...
|
|
virtual void | HitCharacter (Character character, DamageInfo info) |
| Called when the enemy hits the character. More...
|
|
virtual void | SwitchDirection () |
| Called by the enemy to switch (x) direction of the movement. Note that not all movements need to support this, they may do nothing. More...
|
|
virtual bool | CheckForEdge (int movementDirection) |
| Uses the Enemies feet colliders to see if there is nothing below the enemy, and if so returns true. 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...
|
|
Enemy movement which just plays an animation which is mapped to enemy state.
◆ DoMove()
override bool PlatformerPro.EnemyMovement_PlayAnimationOnly.DoMove |
( |
| ) |
|
|
virtual |
◆ Init()
◆ LosingControl()
override bool PlatformerPro.EnemyMovement_PlayAnimationOnly.LosingControl |
( |
| ) |
|
|
virtual |
Called when this movement is losing control.
- Returns
true
, if a final animation is being played and control should not revert false
otherwise.
Reimplemented from PlatformerPro.EnemyMovement.
◆ alwaysFaceTarget
bool PlatformerPro.EnemyMovement_PlayAnimationOnly.alwaysFaceTarget |
If true we always face the target if we have one.
◆ animations
Which animation state to play?
◆ faceTargetLeeway
float PlatformerPro.EnemyMovement_PlayAnimationOnly.faceTargetLeeway = 0.25f |
Leeway required before we change facing direction when facing target.
◆ facingDirection
int PlatformerPro.EnemyMovement_PlayAnimationOnly.facingDirection |
If this is set to non-zero then this animation will always face the given direction. Overruled by 'alwaysFaceTarget'.
◆ mappingLookup
Cached dictionary of the mappings.
◆ myAnimator
Animator PlatformerPro.EnemyMovement_PlayAnimationOnly.myAnimator |
Cached reference to the animator.
◆ sendMoveComplete
bool PlatformerPro.EnemyMovement_PlayAnimationOnly.sendMoveComplete |
If true we will send a move complete to the enemy when the normalised time reaches 1.0f. Requires an Animator Reference.
◆ AnimationState
override AnimationState PlatformerPro.EnemyMovement_PlayAnimationOnly.AnimationState |
|
get |
Gets the animation state that this movement wants to set.
◆ FacingDirection
override int PlatformerPro.EnemyMovement_PlayAnimationOnly.FacingDirection |
|
get |
◆ Info
new static MovementInfo PlatformerPro.EnemyMovement_PlayAnimationOnly.Info |
|
staticget |
Static movement info used by the editor.
The documentation for this class was generated from the following file: