Пример #1
0
        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();
        }
Пример #2
0
        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);
        }