Loading screen fixes, transition screen UI fixes
This commit is contained in:
@@ -2,6 +2,7 @@ using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Collections.Immutable;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
@@ -10,6 +11,8 @@ public partial class BossRoomB : Node3D, IBossRoom, IDungeonFloor
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Dependency] public IGame Game => this.DependOn<IGame>();
|
||||
|
||||
[Node] public Marker3D PlayerSpawn { get; set; } = default!;
|
||||
|
||||
[Node] public DemonWall DemonWall { get; set; } = default!;
|
||||
@@ -18,9 +21,12 @@ public partial class BossRoomB : Node3D, IBossRoom, IDungeonFloor
|
||||
public ImmutableList<IDungeonRoom> Rooms { get; }
|
||||
public bool FloorIsLoaded { get; set; }
|
||||
|
||||
[Node] private Area3D _exit { get; set; } = default!;
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
ActivateTrap.BodyEntered += ActivateTrap_AreaEntered;
|
||||
_exit.AreaEntered += Exit_AreaEntered;
|
||||
}
|
||||
|
||||
private void ActivateTrap_AreaEntered(Node3D area) => StartBossFight();
|
||||
@@ -40,5 +46,14 @@ public partial class BossRoomB : Node3D, IBossRoom, IDungeonFloor
|
||||
|
||||
}
|
||||
|
||||
public void ExitReached()
|
||||
=> Game.FloorExitReached();
|
||||
|
||||
private void Exit_AreaEntered(Area3D area)
|
||||
{
|
||||
if (area.GetOwner() is IPlayer)
|
||||
ExitReached();
|
||||
}
|
||||
|
||||
public Transform3D GetPlayerSpawnPoint() => new Transform3D(PlayerSpawn.Basis, new Vector3(PlayerSpawn.Position.X, 0f, PlayerSpawn.Position.Z));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user