using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public partial class RealmTowerConfig : IConfigPostProcess { public static Dictionary> realmTowerDict = new Dictionary>(); //大境界对应的塔层 public void OnConfigParseCompleted() { int realm = Math.Max(1, RealmConfig.Get(NeedRealmLV).LvLarge); if (!realmTowerDict.ContainsKey(realm)) { realmTowerDict.Add(realm, new List()); } realmTowerDict[realm].Add(FloorID); } //获取当前塔所在境界的所有塔层 public static List GetFloorsByFloorID(int floorID) { int largeRealm = Math.Max(1, RealmConfig.Get(Get(floorID).NeedRealmLV).LvLarge); if (realmTowerDict.ContainsKey(largeRealm)) { return realmTowerDict[largeRealm]; } return null; } //塔层转化,一个新的大境界显示从1层开始 public static int GetFloorIDByFloorID(int floorID) { int largeRealm = Math.Max(1, RealmConfig.Get(Get(floorID).NeedRealmLV).LvLarge); if (realmTowerDict.ContainsKey(largeRealm)) { return realmTowerDict[largeRealm].IndexOf(floorID) + 1; } return 0; } }