Boss A fixes

This commit is contained in:
2026-02-02 20:01:54 -08:00
parent 6e4a4d605c
commit 30f0a078a9
9 changed files with 251 additions and 99 deletions

View File

@@ -37,7 +37,7 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
public Vector3 TargetPosition { get; private set; }
[ExportGroup("Enemy Stats")]
[Export] public int InitialHP { get; set; } = 50;
[Export] public int InitialHP { get; set; }
[Export] public int InitialAttack { get; set; } = 8;
@@ -66,16 +66,6 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
protected bool _activated = false;
private Vector3 _previousPosition = Vector3.Zero;
public Enemy()
{
HealthComponent = new HealthComponent(InitialHP);
HealthComponent.HealthReachedZero += Die;
HealthComponent.DamageTaken += TakeHit;
AttackComponent = new AttackComponent(InitialAttack);
DefenseComponent = new DefenseComponent(InitialDefense);
}
#region Godot methods
public void Setup()
{
@@ -119,6 +109,16 @@ public abstract partial class Enemy : CharacterBody3D, IEnemy, IProvide<IEnemyLo
_enemyLogic.Start();
}
public void OnReady()
{
HealthComponent = new HealthComponent(InitialHP);
HealthComponent.HealthReachedZero += Die;
HealthComponent.DamageTaken += TakeHit;
AttackComponent = new AttackComponent(InitialAttack);
DefenseComponent = new DefenseComponent(InitialDefense);
}
#endregion
public virtual void Activate()