Refactor more stuff (Audio mostly)

This commit is contained in:
2025-03-10 20:52:39 -07:00
parent 23049b3231
commit a1c26ed7fb
45 changed files with 861 additions and 846 deletions

View File

@@ -11,15 +11,17 @@ namespace Zennysoft.Game.Ma;
public interface IMap : INode3D, IProvide<ISaveChunk<MapData>>
{
public void LoadMap();
void LoadMap();
public List<string> FloorScenes { get; }
List<string> FloorScenes { get; }
public IDungeonFloor CurrentFloor { get; }
IDungeonFloor CurrentFloor { get; }
public void SpawnNextFloor();
void SpawnNextFloor();
public Transform3D GetPlayerSpawnPosition();
Transform3D GetPlayerSpawnPosition();
IDungeonRoom GetPlayersCurrentRoom();
}
@@ -95,6 +97,13 @@ public partial class Map : Node3D, IMap
Game.NextFloorLoaded();
}
public IDungeonRoom GetPlayersCurrentRoom()
{
var rooms = CurrentFloor.Rooms;
var playersRoom = rooms.SingleOrDefault(x => x.IsPlayerInRoom);
return playersRoom;
}
public Transform3D GetPlayerSpawnPosition() => CurrentFloor.GetPlayerSpawnPoint();
private void LoadFloor()

View File

@@ -1,6 +1,7 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;

View File

@@ -2,6 +2,7 @@
using Chickensoft.Introspection;
using Godot;
using System.Collections.Immutable;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;