public void Init() { UIRootCamera = GameObject.Find("UI Root/Camera").transform; VTabFile tabFile = new VTabFile("gamesetting/ui/uisetting.tab"); for (int i = 2; i <= tabFile.GetHeight(); ++i) { VUISetting uiSetting = new VUISetting(); string uiName = tabFile.GetString(i, "UIName"); uiSetting.UIName = uiName; uiSetting.Side = tabFile.GetString(i, "AnchorSide"); uiSetting.OffsetX = tabFile.GetFloat(i, "OffsetX"); uiSetting.OffsetY = tabFile.GetFloat(i, "OffsetY"); uiSetting.OffsetZ = tabFile.GetFloat(i, "OffsetZ"); UISettings[uiName] = uiSetting; } }
public void Load() { VTabFile tab = new VTabFile(Main.WeaponDataPath); int height = tab.GetHeight(); for (int row = 2; row <= height; row++) { VWeaponInfo info = new VWeaponInfo(); info.Id = tab.GetInteger(row, "Id"); info.ResName = tab.GetString(row, "ResName"); info.Type = (WeaponType)tab.GetInteger(row, "Type");; info.HurtId = tab.GetInteger(row, "HurtId"); info.AddHp = tab.GetFloat(row, "AddHp"); info.AddDefense = tab.GetFloat(row, "AddDefense"); info.AttackPhysic = tab.GetFloat(row, "AttackPhysic"); info.AddAttackCriticalPossibility = tab.GetFloat(row, "AddAttackCriticalPossibility"); info.AddMoveSpeed = tab.GetFloat(row, "AddMoveSpeed"); _WeaponSetting.Add(info.Id, info); } }
public void Load(Dictionary <int, VAnimalInfo> setting, string path) { setting.Clear(); VTabFile tab = new VTabFile(path); int height = tab.GetHeight(); for (int row = 2; row <= height; row++) { VAnimalInfo info = new VAnimalInfo(); info.Id = tab.GetInteger(row, "Id"); info.Path = tab.GetString(row, "Path"); info.Name = tab.GetString(row, "Name"); info.Level = tab.GetInteger(row, "Level"); info.Hp = tab.GetFloat(row, "Hp"); info.Defense = tab.GetFloat(row, "Defense"); info.AttackPhysic = tab.GetFloat(row, "AttackPhysic"); info.AttackCriticalPossibility = tab.GetFloat(row, "AttackCriticalPossibility"); info.MoveSpeed = tab.GetFloat(row, "MoveSpeed"); setting.Add(info.Id, info); } }