Big refactor in place: Organize nodes in line with dependency injection expectations, use state machine flow more

This commit is contained in:
2024-09-11 15:33:36 -07:00
parent 6a4eb81529
commit 4d47a7586e
63 changed files with 1123 additions and 469 deletions

View File

@@ -6,6 +6,8 @@ using Godot;
public interface IDungeonFloor : INode3D
{
void InitializeDungeon();
public Vector3 GetPlayerSpawnPoint();
}
[Meta(typeof(IAutoNode))]
@@ -19,4 +21,9 @@ public partial class DungeonFloor : Node3D, IDungeonFloor
{
DungeonGenerator.Call("generate");
}
public Vector3 GetPlayerSpawnPoint()
{
return Vector3.Zero;
}
}

View File

@@ -1,6 +1,5 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using DialogueManagerRuntime;
using GameJamDungeon;
using Godot;
@@ -18,4 +17,9 @@ public partial class Overworld : Node3D, IDungeonFloor
{
GameRepo.SetPlayerGlobalPosition(PlayerSpawnPoint.GlobalPosition);
}
public Vector3 GetPlayerSpawnPoint()
{
return PlayerSpawnPoint.GlobalPosition;
}
}