Esempio n. 1
0
 public void UnloadPersistentMap(MapIDs map)
 {
     if (SceneManager.GetSceneByName(map.ToString()).isLoaded)
     {
         SceneManager.UnloadSceneAsync(map.ToString());
     }
 }
Esempio n. 2
0
        /// <summary>
        ///     Instructs the player client to load a specific map (S2C_WORLD_PRE_LOGIN)
        /// </summary>
        /// <param name="newMap"></param>
        public void LoadClientMap(MapIDs newMap)
        {
            var m = GameHeader.S2C_WORLD_PRE_LOGIN.CreatePacket();

            m.WriteInt32((int)PacketStatusCode.NO_ERROR);
            m.WriteInt32((int)newMap);
            Connection.SendMessage(m);
            ActiveClientMap = newMap;
        }
        protected override void Process(ProgressInfo rpProgress, BattleInfo rpBattle, RawBattleResult rpResult)
        {
            if (!rpBattle.IsBossBattle)
            {
                return;
            }

            var rSortie = SortieInfo.Current;

            if (MapIDs.Contains(rSortie.Map.ID) && rpResult.Rank >= LowestRank)
            {
                rpProgress.Progress++;
            }
        }
Esempio n. 4
0
 public GameMap(Scene scene, MapIDs id, SBWorld sbWorld, int instanceID)
 {
     this.scene = scene;
     ID         = id;
     InstanceID = instanceID;
     SBWorld    = sbWorld;
     grid       = new MapGrid <Actor>(CellSize);
     foreach (var rootObject in scene.GetRootGameObjects())
     {
         actors.AddRange(rootObject.GetComponentsInChildren <Actor>(true));
     }
     LevelInfo = Find <LevelInfo>(_ => true); //first available, there should only ever be one
     if (LevelInfo == null)
     {
         throw new NullReferenceException("LevelInfo could not be found, this should not happen");
     }
     LevelInfo.GameMap = this;
 }
Esempio n. 5
0
        public GameMap GetPersistentMap(MapIDs map)
        {
            GameMap scene;

            return(loadedMaps.TryGetValue(map, out scene) ? scene : null);
        }
Esempio n. 6
0
 public void LoadPersistentMap(MapIDs map)
 {
     SceneManager.LoadScene(map.ToString(), LoadSceneMode.Additive);
 }