Refactor more stuff (Audio mostly)
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Collections.Immutable;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user