public void Setup(TobiraData tobiraData) { if (tobiraData == null) { DebugUtility.LogError("tobiraDataがnullの時はSetup(TobiraParam param)を使用してください"); } else { this.m_Category = tobiraData.Param.TobiraCategory; this.m_TextTobiraName.set_text(TobiraParam.GetCategoryName(this.m_Category)); this.m_IconTobira.ImageIndex = (int)this.m_Category; if (tobiraData.IsLearnedLeaderSkill) { TobiraLearnSkill listItem = this.CreateListItem(); SkillData skill = new SkillData(); skill.Setup(tobiraData.LearnedLeaderSkillIname, 1, 1, (MasterParam)null); listItem.Setup(skill); } List <AbilityData> newAbilitys = new List <AbilityData>(); List <AbilityData> oldAbilitys = new List <AbilityData>(); TobiraUtility.TryCraeteAbilityData(tobiraData.Param, tobiraData.Lv, newAbilitys, oldAbilitys, false); for (int index = 0; index < newAbilitys.Count; ++index) { this.CreateListItem().Setup(newAbilitys[index]); } BaseStatus add = new BaseStatus(); BaseStatus scale = new BaseStatus(); TobiraUtility.CalcTobiraParameter(tobiraData.Param.UnitIname, this.m_Category, tobiraData.Lv, ref add, ref scale); this.m_StatusList.SetValues(add, scale, false); GameUtility.SetGameObjectActive(this.m_ObjectDetail, true); GameUtility.SetGameObjectActive(this.m_ObjectLock, false); GameUtility.SetGameObjectActive(this.m_ObjectCommingSoon, false); } }
private TobiraLearnSkill CreateListItem() { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)((Component)this.m_TobiraLearnSkillTemplate).get_gameObject()); TobiraLearnSkill component = (TobiraLearnSkill)gameObject.GetComponent <TobiraLearnSkill>(); gameObject.get_transform().SetParent((Transform)this.m_TobiraLearnSkillParent, false); gameObject.SetActive(true); return(component); }