Play test animation

This commit is contained in:
2025-12-03 22:29:24 -08:00
parent 3c369f79f7
commit 34742d568e
3 changed files with 201 additions and 192 deletions

View File

@@ -40,6 +40,8 @@ public interface IPlayer : IKillable, ICharacterBody3D
public IEquipmentComponent EquipmentComponent { get; }
public void PlayTestAnimation();
public event Action PlayerDied;
public delegate InventoryItem RerollItem(InventoryItem item);
}

View File

@@ -402,6 +402,7 @@ public partial class Game : Node3D, IGame
private void EnactEffectItemEffects(EffectItem effectItem)
{
_player.PlayTestAnimation();
switch (effectItem.UsableItemTag)
{
case UsableItemTag.TeleportAllEnemiesToRoom:
@@ -450,6 +451,7 @@ public partial class Game : Node3D, IGame
private void EnactThrowableItemEffects(ThrowableItem throwableItem)
{
_player.PlayTestAnimation();
switch (throwableItem.ThrowableItemTag)
{
case ThrowableItemTag.DoubleExp:

View File

@@ -242,6 +242,11 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
Settings.MoveSpeed /= 2;
}
public void PlayTestAnimation()
{
PlayerFXAnimations.Play("test_animation");
}
public void OnPhysicsProcess(double delta)
{
PlayerLogic.Input(new PlayerLogic.Input.PhysicsTick(delta));