Additional refactoring and fixing of equipment data
Add attack data to enemy attacks (might need to rework a little bit for primary/secondary attacks)
This commit is contained in:
@@ -19,6 +19,8 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
|
||||
[Node] public AnimationTree AnimationTree { get; set; } = default!;
|
||||
|
||||
[Export] public AttackDataResource AttackData { get; set; }
|
||||
|
||||
private AnimationNodeStateMachinePlayback _stateMachine;
|
||||
|
||||
public event EventHandler HitPlayer;
|
||||
@@ -44,10 +46,7 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView
|
||||
|
||||
public virtual void PlayHitAnimation() => throw new System.NotImplementedException();
|
||||
|
||||
protected virtual void OnPlayerHit()
|
||||
{
|
||||
HitPlayer?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
protected virtual void OnPlayerHit(AttackEventArgs arg) => HitPlayer?.Invoke(this, arg);
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user