Partially fix boss room A, only one guy moves though
This commit is contained in:
@@ -15,13 +15,13 @@ public partial class BossRoomA : Node3D, IBossRoom, IDungeonFloor
|
||||
|
||||
[Node] public Marker3D PlayerSpawn { get; set; } = default!;
|
||||
|
||||
//[Node] public Node3D HorseHeadStatue { get; set; } = default!;
|
||||
[Node] public Node3D HorseHeadStatue { get; set; } = default!;
|
||||
|
||||
[Node] public Node3D OxFaceStatue { get; set; } = default!;
|
||||
|
||||
[Node] public BossTypeA OxFace { get; set; } = default!;
|
||||
|
||||
//[Node] public BossTypeA HorseFace { get; set; } = default!;
|
||||
[Node] public BossTypeA HorseHead { get; set; } = default!;
|
||||
|
||||
[Node] public Area3D ActivateTrap { get; set; } = default!;
|
||||
|
||||
@@ -36,7 +36,7 @@ public partial class BossRoomA : Node3D, IBossRoom, IDungeonFloor
|
||||
ActivateTrap.BodyEntered += ActivateTrap_BodyEntered;
|
||||
_exit.AreaEntered += Exit_AreaEntered;
|
||||
OxFace.HealthComponent.HealthReachedZero += CheckForBossFightEnd;
|
||||
//HorseFace.HealthComponent.HealthReachedZero += CheckForBossFightEnd;
|
||||
HorseHead.HealthComponent.HealthReachedZero += CheckForBossFightEnd;
|
||||
}
|
||||
|
||||
private void ActivateTrap_BodyEntered(Node3D body)
|
||||
@@ -48,14 +48,14 @@ public partial class BossRoomA : Node3D, IBossRoom, IDungeonFloor
|
||||
public void StartBossFight()
|
||||
{
|
||||
OxFaceStatue.Hide();
|
||||
//HorseHeadStatue.Hide();
|
||||
HorseHeadStatue.Hide();
|
||||
OxFace.StartFight();
|
||||
//HorseFace.StartFight();
|
||||
HorseHead.StartFight();
|
||||
}
|
||||
|
||||
private void CheckForBossFightEnd()
|
||||
{
|
||||
if (OxFace.HealthComponent.CurrentHP.Value <= 0) //&& HorseFace.HealthComponent.CurrentHP.Value <= 0)
|
||||
if (OxFace.HealthComponent.CurrentHP.Value <= 0 && HorseHead.HealthComponent.CurrentHP.Value <= 0)
|
||||
OnBossFightEnded();
|
||||
}
|
||||
|
||||
@@ -78,5 +78,5 @@ public partial class BossRoomA : Node3D, IBossRoom, IDungeonFloor
|
||||
|
||||
}
|
||||
|
||||
public Transform3D GetPlayerSpawnPoint() => PlayerSpawn.GlobalTransform;
|
||||
public Transform3D GetPlayerSpawnPoint() => new Transform3D(PlayerSpawn.GlobalBasis, new Vector3(PlayerSpawn.GlobalPosition.X, -2.5f, PlayerSpawn.GlobalPosition.Z));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user