Cleanup
This commit is contained in:
@@ -7,7 +7,7 @@ using Zennysoft.Ma.Adapter;
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class Floor0 : Node3D, IDungeonFloor
|
||||
public partial class Altar : Node3D, IDungeonFloor
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
@@ -23,15 +23,15 @@ public partial class Floor0 : Node3D, IDungeonFloor
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Show();
|
||||
Exit.AreaEntered += Exit_AreaEntered;
|
||||
FloorIsLoaded = true;
|
||||
Show();
|
||||
Exit.AreaEntered += Exit_AreaEntered;
|
||||
FloorIsLoaded = true;
|
||||
}
|
||||
|
||||
private void Exit_AreaEntered(Area3D area)
|
||||
{
|
||||
if (area.GetOwner() is IPlayer)
|
||||
ExitReached();
|
||||
if (area.GetOwner() is IPlayer)
|
||||
ExitReached();
|
||||
}
|
||||
|
||||
public void ExitReached() => Game.FloorExitReached();
|
||||
@@ -1,25 +0,0 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class BossFloor : Node3D, IDungeonFloor
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Node] private IBossRoom BossFloorRoom { get; set; } = default!;
|
||||
|
||||
public ImmutableList<IDungeonRoom> Rooms => [];
|
||||
|
||||
public void InitializeDungeon()
|
||||
{
|
||||
FloorIsLoaded = true;
|
||||
}
|
||||
|
||||
public bool FloorIsLoaded { get; set; }
|
||||
|
||||
public Transform3D GetPlayerSpawnPoint() => BossFloorRoom.PlayerSpawn.GlobalTransform;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
uid://b74nta2e20elm
|
||||
@@ -1,17 +0,0 @@
|
||||
@tool
|
||||
extends DungeonRoom3D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
super._ready()
|
||||
dungeon_done_generating.connect(remove_unused_doors_and_walls)
|
||||
|
||||
func remove_unused_doors_and_walls():
|
||||
if get_door_by_node($"Doors/DOOR?").get_room_leads_to() != null:
|
||||
$"Doors/DOOR?".queue_free()
|
||||
if get_door_by_node($"Doors/DOOR?2").get_room_leads_to() != null:
|
||||
$"Doors/DOOR?2".queue_free()
|
||||
if get_door_by_node($"Doors/DOOR?3").get_room_leads_to() != null:
|
||||
$"Doors/DOOR?3".queue_free()
|
||||
if get_door_by_node($"Doors/DOOR?4").get_room_leads_to() != null:
|
||||
$"Doors/DOOR?4".queue_free()
|
||||
@@ -1 +0,0 @@
|
||||
uid://fk3jis6rsipv
|
||||
Reference in New Issue
Block a user