예제 #1
0
        public ZLevelTracker(Map newZeroLevlMap, MapParent newZeroLevel, MapParent_ZLevel mp, bool downwards)
        {
            layersState.Add(0, newZeroLevel as MapParent_ZLevel);
            zeroLevelMap = newZeroLevlMap;
            zeroLevel    = newZeroLevel;

            //Refog zero layer
            Traverse.Create(newZeroLevlMap.fogGrid).Method("SetAllFogged", new object[] { }).GetValue();

            AddLayer(mp, downwards);
        }
예제 #2
0
        public void AddLayer(MapParent_ZLevel mp, bool downwards)
        {
            int nextEmptyLayer = (downwards) ? NextNewLevelDown() : NextNewLevelUp();

            mp.SetZ(nextEmptyLayer);
            this.layersState.Add(nextEmptyLayer, mp);

            //Refog the map
            if (mp.HasMap && mp.Map != null)
            {
                Traverse.Create(mp.Map.fogGrid).Method("SetAllFogged", new object[] { }).GetValue();
            }
        }
예제 #3
0
 public void InsertNewZLevel(Map zeroMap, MapParent zeroLevel, MapParent_ZLevel newLevel, bool downwards = true)
 {
     if (mapIDs.ContainsKey(zeroMap))
     {
         tilesWithZLevels[mapIDs[zeroMap]].AddLayer(newLevel, downwards);
         Log.Message(mapIDs[zeroMap] + " Series, Z Levels: " + NumOfZLevelsAtMap(zeroMap));
         return;
     }
     mapIDs.Add(zeroMap, nextSeries);
     mapIDs.Add(newLevel.Map, nextSeries);
     tilesWithZLevels.Add(nextSeries, new ZLevelTracker(zeroMap, zeroLevel, newLevel, downwards));
     Log.Message(nextSeries + " Series, Z Levels: " + NumOfZLevelsAtMap(zeroMap));
     nextSeries++;
 }
예제 #4
0
        public void DestroyLevel(MapParent_ZLevel layer)
        {
            int z = layer.Z;

            this.layersState[z] = null;
        }