More Chariot fixes
@@ -11,7 +11,7 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Ma"
|
config/name="Ma"
|
||||||
run/main_scene="uid://d1gjaijijd5ot"
|
run/main_scene="uid://c7wjbgbrdivol"
|
||||||
run/print_header=false
|
run/print_header=false
|
||||||
config/features=PackedStringArray("4.4", "C#", "GL Compatibility")
|
config/features=PackedStringArray("4.4", "C#", "GL Compatibility")
|
||||||
run/delta_smoothing=false
|
run/delta_smoothing=false
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLogic>
|
|||||||
{
|
{
|
||||||
if (_enemyLogic.Value is EnemyLogic.State.Patrolling or EnemyLogic.State.FollowPlayer)
|
if (_enemyLogic.Value is EnemyLogic.State.Patrolling or EnemyLogic.State.FollowPlayer)
|
||||||
_enemyModelView.PlayWalkAnimation();
|
_enemyModelView.PlayWalkAnimation();
|
||||||
else
|
else if (_enemyModelView is not ICanActivate)
|
||||||
_enemyModelView.PlayIdleAnimation();
|
_enemyModelView.PlayIdleAnimation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,26 +50,6 @@ public partial class ChariotModelView : EnemyModelView2D, ICanActivate
|
|||||||
PlayActivationAnimation();
|
PlayActivationAnimation();
|
||||||
return;
|
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()
|
public void Activate()
|
||||||
@@ -80,6 +60,36 @@ public partial class ChariotModelView : EnemyModelView2D, ICanActivate
|
|||||||
PlayActivationAnimation();
|
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()
|
private void PlayActivationAnimation()
|
||||||
{
|
{
|
||||||
switch (_currentDirection)
|
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 |