public static void ReloadLocationObjects() { _logger.Info($"Reloading location objects for world location {WorldData.WorldLocationId}"); ParentManager.Instance.ParentCommand = ParentCommand.None; GameStateData.ClearObjects(); WorldData.ObjectsAreChanged = false; WorldLocation location = WorldData.WorldStructure.WorldLocations.GetWorldLocation(WorldData.WorldLocationId); LogicInstance logicInstance = new LogicInstance(WorldData.WorldLocationId); GameStateData.RefreshLogic(logicInstance, WorldData.LogicCode); CreateSpawnEntities(location.WorldLocationObjects, WorldData.WorldLocationId); WorldDataListener.Instance.ReadyToGetNewMessages(); }
public static void LoadLocationObjects(int newWorldLocationId, int oldWorldLocationId) { _logger.Info($"Loading location objects for world location {newWorldLocationId}"); ParentManager.Instance.ParentCommand = ParentCommand.None; GameStateData.ClearObjects(); WorldData.ObjectsAreChanged = false; WorldLocation location = WorldData.WorldStructure.WorldLocations.GetWorldLocation(newWorldLocationId); LogicInstance logicInstance = new LogicInstance(newWorldLocationId); GameStateData.RefreshLogic(logicInstance, WorldData.LogicCode); CreateSpawnEntities(location.WorldLocationObjects, newWorldLocationId); }