More Chariot fixes
@@ -102,7 +102,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
|
||||
{
|
||||
if (_enemyLogic.Value is EnemyLogic.State.Patrolling or EnemyLogic.State.FollowPlayer)
|
||||
_enemyModelView.PlayWalkAnimation();
|
||||
else
|
||||
else if (_enemyModelView is not ICanActivate)
|
||||
_enemyModelView.PlayIdleAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,26 +50,6 @@ public partial class ChariotModelView : EnemyModelView2D, ICanActivate
|
||||
PlayActivationAnimation();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (_currentDirection)
|
||||
{
|
||||
case DirectionType.FORWARD:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_FRONT);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(FRONT);
|
||||
break;
|
||||
case DirectionType.LEFT:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_LEFT);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(LEFT);
|
||||
break;
|
||||
case DirectionType.RIGHT:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_RIGHT);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(RIGHT);
|
||||
break;
|
||||
case DirectionType.BACKWARD:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_BACK);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(BACK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate()
|
||||
@@ -80,6 +60,36 @@ public partial class ChariotModelView : EnemyModelView2D, ICanActivate
|
||||
PlayActivationAnimation();
|
||||
}
|
||||
|
||||
public override void PlayIdleAnimation()
|
||||
{
|
||||
if (_activated)
|
||||
{
|
||||
switch (_currentDirection)
|
||||
{
|
||||
case DirectionType.FORWARD:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_FRONT);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(FRONT);
|
||||
break;
|
||||
case DirectionType.LEFT:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_LEFT);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(LEFT);
|
||||
break;
|
||||
case DirectionType.RIGHT:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_RIGHT);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(RIGHT);
|
||||
break;
|
||||
case DirectionType.BACKWARD:
|
||||
AnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(ACTIVATED_IDLE_BACK);
|
||||
ScrollAnimationTree.Get(PARAMETERS_PLAYBACK).As<AnimationNodeStateMachinePlayback>().Travel(BACK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.PlayIdleAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
private void PlayActivationAnimation()
|
||||
{
|
||||
switch (_currentDirection)
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 43 KiB |