Big refactor in place: Organize nodes in line with dependency injection expectations, use state machine flow more
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user