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:
2025-10-23 00:05:44 -07:00
parent f0c4e65783
commit bc161a58b3
73 changed files with 641 additions and 641 deletions

View File

@@ -2,6 +2,7 @@ using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using System.Linq;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
[Meta(typeof(IAutoNode))]
@@ -31,7 +32,7 @@ public partial class EnemyModelView2D : EnemyModelView, IEnemyModelView
base.OnReady();
}
private void Hitbox_AreaEntered(Area3D area) => OnPlayerHit();
private void Hitbox_AreaEntered(Area3D area) => OnPlayerHit(new AttackEventArgs(new AttackData(10, ElementType.None)));
public void SetCurrentDirection(Basis enemyBasis, Vector3 cameraDirection) => _enemyDirection = GetEnemyDirection(enemyBasis, cameraDirection, _upperThreshold, _lowerThreshold);
@@ -135,4 +136,4 @@ public partial class EnemyModelView2D : EnemyModelView, IEnemyModelView
{
_enemyDirection = EnemyDirection.Backward;
}
}
}