void CheckSuit(int id) { if (GetSuitAmount(id) == 5) { suit_id = id; var commond = SuitConfig.Get(id).suit_function.Split(';'); foreach (var c in commond) { GameStaticMethod.ExecuteCommond(c); } } else { if (suit_id != -1) { var commond = SuitConfig.Get(suit_id).suit_function.Split(';'); foreach (var c in commond) { GameStaticMethod.ExecuteBackCommond(c); } suit_id = -1; } } }
/// <summary>语言包加载完成</summary> private void OnComplete_LoadedLang() { TextManager.SetQueryString(); ItemManager.Init(); CommonConfig.Init(); LotterRewardManager.Init(); SuitConfig.Init(); ClothesConfig.Init(); ClothesSlevelConfig.Init(); ClothesLevelConfig.Init(); BabyLikingConfig.Init(); UseEquipConfig.Init(); ClothesInheritConfig.Init(); ClothesMapConfig.Init(); CloneLevelConfig.Init(); LevelRewardConfig.Init(); ArenaConfig.Init(); SkillLevelConfig.Init(); PropertySkillLevelConfig.Init(); BossDailyConfig.Init(); BossRewardConfig.Init(); InstanceProxy.Get <PieceSwitchConfig>().LoadXml(); InstanceProxy.Get <PlayerPositionConfig>().LoadXml(); InstanceProxy.Get <MatchArrayConfig>().LoadXml(); InstanceProxy.Get <PositionAttributeConfig>().LoadXml(); InstanceProxy.Get <RandNameConfig>().LoadXml(); InstanceProxy.Get <SkinConfig>().LoadXml(); InstanceProxy.Get <MonsterConfig>().LoadXml(); InstanceProxy.Get <CloneConfig>().LoadXml(); InstanceProxy.Get <CameraConfig>().LoadXml(); InstanceProxy.Get <MentalityMaxConfig>().LoadXml(); InstanceProxy.Get <AbilityConfig>().LoadXml(); InstanceProxy.Get <SkillConfig>().LoadXml(); InstanceProxy.Get <SkillAIConfig>().LoadXml(); }
protected override OdinMenuTree BuildMenuTree() { _tree = new OdinMenuTree(true); _tree.DefaultMenuStyle.IconSize = 28.00f; _tree.Config.DrawSearchToolbar = true; SuitConfig.Reload(); if (SuitConfig.Count > 0) { foreach (var item in SuitConfig.Datas) { _tree.Add(item.Value.suit_name, item.Value); } } return(_tree); }
static public void LoadFromJson(JsonData json) { WeaponConfig.LoadFromJson(json["Weapon"]); EnemyConfig.LoadFromJson(json["Enemy"]); FootConfig.LoadFromJson(json["Foot"]); SleeveConfig.LoadFromJson(json["Sleeve"]); ArmConfig.LoadFromJson(json["Arm"]); PelvisConfig.LoadFromJson(json["Pelvis"]); EyeConfig.LoadFromJson(json["EyeConfig"]); MouthConfig.LoadFromJson(json["MouthConfig"]); HairConfig.LoadFromJson(json["HairConfig"]); EarConfig.LoadFromJson(json["EarConfig"]); SkillConfig.LoadFromJson(json["Skill"]); TorsoConfig.LoadFromJson(json["Torso"]); ShieldConfig.LoadFromJson(json["Shield"]); SuitConfig.LoadFromJson(json["Suit"]); ConsumablesConfig.LoadFromJson(json["Consumables"]); HairDecorateConfig.LoadFromJson(json["HairDecorateConfig"]); }
// Update is called once per frame protected override void OnBeginDrawEditors() { var selected = this.MenuTree.Selection.FirstOrDefault(); var toolbarHeight = this.MenuTree.Config.SearchToolbarHeight; SirenixEditorGUI.BeginHorizontalToolbar(toolbarHeight); { SirenixEditorGUI.ToolbarTab(false, new GUIContent("")); if (SirenixEditorGUI.ToolbarButton(new GUIContent(" + ")) && !isCreate) { isCreate = true; SuitConfig w = new SuitConfig(); w.ID = _tree.MenuItems.Count + 1; _tree.Add("New Suit", w); _tree.MenuItems[_tree.MenuItems.Count - 1].Select(); } } SirenixEditorGUI.EndHorizontalToolbar(); }
public override string GetTipString() { var type = GetType(); var fields = type.GetFields(); StringBuilder sb = new StringBuilder(); SortedDictionary <int, string> dict = new SortedDictionary <int, string>(); foreach (var field in fields) { var tip_attribute = field.GetCustomAttribute(typeof(TipAttribute)); if (tip_attribute != null) { var attribute = (tip_attribute as TipAttribute); if (attribute.showName == "") { attribute.showName = field.Name; } var valueStr = DreamerTool.Util.DreamerUtil.GetColorRichText(field.GetValue(this).ToString(), attribute.valueColor); dict.Add(attribute.index, attribute.showName + ": " + valueStr + "\n"); } } foreach (var item in dict) { if (item.Key < 3) { sb.Append("\t\t\t\t\t"); } if (item.Key == 3) { sb.Append("\n"); } if (item.Key == int.MaxValue) { sb.Append(SuitConfig.Get(物品ID).GetItemUITipStr() + "\n"); } sb.Append(item.Value); } return(sb.ToString()); }
/// <summary> /// 设置信息 /// </summary> public void SetSuitInfo() { suit_num = 0; if (cur_equip_info.suit <= 0) { return; } List <EquipItemInfo> equipList = EquipConfig.GetEquipDataListByPlayerID(player_id); for (int i = 0; i < equipList.Count; i++) { EquipInfo info = EquipConfig.GetEquipInfo(int.Parse(equipList[i].itemID)); if (info.suit == cur_equip_info.suit) { suit_num++; } } List <object> listObj = new List <object>(); SuitInfo suit_infp = SuitConfig.GetSuitInfoByID(cur_equip_info.suit); if (suit_infp == null) { return; } for (int j = 0; j < 4; j++) { SuitItemInfo suit = new SuitItemInfo(); string descText = string.Format(TextManager.GetPropsString(UtilTools.StringBuilder("suit", suit_infp.id, j + 2)), suit_infp.suitAdd.Split(',')[j]); suit.content = descText; int active = suit_num > (j + 1) ? 1 : 0; suit.active = active; listObj.Add(suit); } panel.suitGrid.AddCustomDataList(listObj); }