Fix spawn point for player, add flee behavior for gold sproingy

This commit is contained in:
2025-10-29 11:03:07 -07:00
parent 21d8c4770d
commit 575a565a2c
13 changed files with 176 additions and 7 deletions

View File

@@ -134,6 +134,7 @@ public partial class Game : Node3D, IGame
_instantiator = new Instantiator(GetTree());
_player = _instantiator.LoadAndInstantiate<Player>("res://src/player/Player.tscn");
_map = _instantiator.LoadAndInstantiate<Map>("res://src/map/Map.tscn");
_map.SpawnPointCreated += MovePlayer;
PauseContainer.AddChild((Player)_player);
PauseContainer.AddChild((Map)_map);
}
@@ -167,8 +168,6 @@ public partial class Game : Node3D, IGame
GameRepo.IsPaused.Sync += IsPaused_Sync;
InGameUI.PlayerInfoUI.Activate();
_map.SpawnPointCreated += MovePlayer;
}
public void LoadExistingGame() => SaveFile.Load().ContinueWith((_) => CallDeferred(nameof(FinishedLoadingSaveFile)));