Enemy viewer revamp, loading screen improvement
This commit is contained in:
@@ -41,6 +41,8 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
[Export]
|
||||
public bool CanMove { get; set; } = false;
|
||||
|
||||
[Export] public EnemyLoreInfo EnemyLoreInfo { get; set; } = default!;
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
if (AnimationTree != null)
|
||||
@@ -50,32 +52,50 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
}
|
||||
}
|
||||
|
||||
public virtual Vector2 GetSize()
|
||||
{
|
||||
return Vector2.Zero;
|
||||
}
|
||||
|
||||
public virtual void PlayPrimaryAttackAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation("primary_attack"))
|
||||
return;
|
||||
_walkSFX.Stop();
|
||||
_stateMachine.Travel(_primaryAttackName, false);
|
||||
}
|
||||
|
||||
public virtual void PlaySecondaryAttackAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation("secondary_attack"))
|
||||
return;
|
||||
_walkSFX.Stop();
|
||||
_stateMachine.Travel(_secondaryAttackName, false);
|
||||
}
|
||||
|
||||
public virtual void PlayPrimarySkillAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation("teleport"))
|
||||
return;
|
||||
|
||||
_walkSFX.Stop();
|
||||
_stateMachine.Travel(_primarySkillName, false);
|
||||
}
|
||||
|
||||
public virtual void PlayIdleAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation("idle_front"))
|
||||
return;
|
||||
|
||||
_walkSFX.Stop();
|
||||
_stateMachine.Travel(_idleName, false);
|
||||
}
|
||||
|
||||
public virtual void PlayWalkAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation("idle_front_walking"))
|
||||
return;
|
||||
|
||||
if (!_walkSFX.Playing)
|
||||
_walkSFX.Play();
|
||||
_stateMachine.Travel(_walkingName, false);
|
||||
@@ -89,6 +109,9 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
|
||||
public virtual void PlayActivateAnimation()
|
||||
{
|
||||
if (!AnimationTree.HasAnimation(_activateFront))
|
||||
return;
|
||||
|
||||
_walkSFX.Stop();
|
||||
_stateMachine.Travel(_activateName, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user