Fix Altar scaling
This commit is contained in:
@@ -33,44 +33,44 @@ public partial class BossRoomA : Node3D, IBossRoom, IDungeonFloor
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
ActivateTrap.BodyEntered += ActivateTrap_BodyEntered;
|
||||
_exit.AreaEntered += Exit_AreaEntered;
|
||||
OxFace.HealthComponent.HealthReachedZero += CheckForBossFightEnd;
|
||||
HorseHead.HealthComponent.HealthReachedZero += CheckForBossFightEnd;
|
||||
ActivateTrap.BodyEntered += ActivateTrap_BodyEntered;
|
||||
_exit.AreaEntered += Exit_AreaEntered;
|
||||
OxFace.HealthComponent.HealthReachedZero += CheckForBossFightEnd;
|
||||
HorseHead.HealthComponent.HealthReachedZero += CheckForBossFightEnd;
|
||||
}
|
||||
|
||||
private void ActivateTrap_BodyEntered(Node3D body)
|
||||
{
|
||||
ActivateTrap.BodyEntered -= ActivateTrap_BodyEntered;
|
||||
StartBossFight();
|
||||
ActivateTrap.BodyEntered -= ActivateTrap_BodyEntered;
|
||||
StartBossFight();
|
||||
}
|
||||
|
||||
public void StartBossFight()
|
||||
{
|
||||
OxFaceStatue.Hide();
|
||||
HorseHeadStatue.Hide();
|
||||
OxFace.StartFight();
|
||||
HorseHead.StartFight();
|
||||
OxFaceStatue.Hide();
|
||||
HorseHeadStatue.Hide();
|
||||
OxFace.StartFight();
|
||||
HorseHead.StartFight();
|
||||
}
|
||||
|
||||
private void CheckForBossFightEnd()
|
||||
{
|
||||
if (OxFace.HealthComponent.CurrentHP.Value <= 0 && HorseHead.HealthComponent.CurrentHP.Value <= 0)
|
||||
OnBossFightEnded();
|
||||
if (OxFace.HealthComponent.CurrentHP.Value <= 0 && HorseHead.HealthComponent.CurrentHP.Value <= 0)
|
||||
OnBossFightEnded();
|
||||
}
|
||||
|
||||
public void OnBossFightEnded()
|
||||
{
|
||||
BossDoor.CallDeferred(MethodName.QueueFree);
|
||||
BossDoor.CallDeferred(MethodName.QueueFree);
|
||||
}
|
||||
|
||||
public void ExitReached()
|
||||
=> Game.FloorExitReached();
|
||||
=> Game.FloorExitReached();
|
||||
|
||||
private void Exit_AreaEntered(Area3D area)
|
||||
{
|
||||
if (area.GetOwner() is IPlayer)
|
||||
ExitReached();
|
||||
if (area.GetOwner() is IPlayer)
|
||||
ExitReached();
|
||||
}
|
||||
|
||||
public void InitializeDungeon()
|
||||
@@ -78,5 +78,5 @@ public partial class BossRoomA : Node3D, IBossRoom, IDungeonFloor
|
||||
|
||||
}
|
||||
|
||||
public Transform3D GetPlayerSpawnPoint() => new Transform3D(PlayerSpawn.GlobalBasis, new Vector3(PlayerSpawn.GlobalPosition.X, -2.5f, PlayerSpawn.GlobalPosition.Z));
|
||||
public (Vector3 Rotation, Vector3 Position) GetPlayerSpawnPoint() { return (PlayerSpawn.Rotation, new Vector3(PlayerSpawn.GlobalPosition.X, -2.5f, PlayerSpawn.GlobalPosition.Z)); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user