Work SFX work

Fix up Eden Pillar behavior
This commit is contained in:
2025-11-26 02:12:24 -08:00
parent db7a1df1f7
commit ed9e611fd9
86 changed files with 2822 additions and 2603 deletions

View File

@@ -1,4 +1,5 @@
using Zennysoft.Ma.Adapter;
using Godot;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
@@ -30,9 +31,13 @@ public interface IHasTertiaryAttack
public interface IHasPrimarySkill
{
public void PrimarySkill();
[Export] public AttackDataResource AttackData { get; set; }
}
public interface IHasRangedAttack
{
public void RangedAttack();
[Export] public AttackDataResource AttackData { get; set; }
}

View File

@@ -20,16 +20,24 @@ public partial class Projectile : Node3D
public void OnReady()
{
ProjectileHitbox.AreaEntered += Hitbox_AreaEntered;
ProjectileHitbox.AreaEntered += Hitbox_AreaEntered;
ProjectileHitbox.BodyEntered += ProjectileHitbox_BodyEntered;
}
private void ProjectileHitbox_BodyEntered(Node3D body)
{
AnimationPlayer.Play("RESET");
}
public void Fire()
{
AnimationPlayer.Play("Fire");
AnimationPlayer.Play("Fire");
}
private void Hitbox_AreaEntered(Area3D area)
{
_player.TakeDamage(new AttackData(AttackData.Damage, AttackData.ElementType));
if (area.GetOwner() is IPlayer)
_player.TakeDamage(new AttackData(AttackData.Damage, AttackData.ElementType));
AnimationPlayer.Play("RESET");
}
}