Work SFX work
Fix up Eden Pillar behavior
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user