public void UpdateSkillList(Hotfix_LT.Combat.CombatCharacterSyncData character_data) { if (!isShow) { return; } if (character_data == CharacterData) { var emr = character_data.SkillDataList.Values.GetEnumerator(); while (emr.MoveNext()) { Hotfix_LT.Combat.CombatCharacterSyncData.SkillData skilldata = emr.Current; if (skilldata.SkillType != (int)Hotfix_LT.Data.eSkillType.NORMAL && skilldata.SkillType != (int)Hotfix_LT.Data.eSkillType.PASSIVE && skilldata.SkillType != (int)Hotfix_LT.Data.eSkillType.ACTIVE) { continue; } int skillDataIndex = skilldata.Index; CombatSkillItem skillItem = null; skillItem = mDMono.transform.GetChild(skillDataIndex).GetMonoILRComponent <CombatSkillItem>(); if (skilldata != null) { skillItem.mDMono.name = skilldata.SkillType.ToString() + skillDataIndex; skillItem.Fill(skilldata, false, true); } } } }
public void OnSelectScrollEvent(int skillid) { UseScrollSkillId = skillid; BagSelectFrame.gameObject.CustomSetActive(true); for (var i = 0; i < mDMono.transform.childCount; i++) { CombatSkillItem item = mDMono.transform.GetChild(i).GetMonoILRComponent <CombatSkillItem>(); item.UnSelect(); } SetTargetingInfo(skillid, -1); }
public void OnSkillSelectEvent(int skillID, Hotfix_LT.Data.eSkillType skillType) { UseScrollSkillId = 0; BagSelectFrame.gameObject.CustomSetActive(false); if (skillType == Hotfix_LT.Data.eSkillType.NORMAL) { SetTargetingInfo(skillID, _COMMON_TYPE); } else if (skillType == Hotfix_LT.Data.eSkillType.ACTIVE) { SetTargetingInfo(skillID, _SPECIAL_TYPE); } for (var i = 0; i < mDMono.transform.childCount; i++) { CombatSkillItem item = mDMono.transform.GetChild(i).GetMonoILRComponent <CombatSkillItem>(); if (item.Data.ID != skillID) { item.UnSelect(); } } }
public void ShowSkill(Combat.CombatCharacterSyncData character_data) { isShow = true; if (character_data.Uid != LoginManager.Instance.LocalUserId.Value) { return; } CharacterData = character_data; int realSkillCount = 0; var emr = character_data.SkillDataList.Values.GetEnumerator(); while (emr.MoveNext()) { Combat.CombatCharacterSyncData.SkillData skilldata = emr.Current; if (skilldata.SkillType != (int)Data.eSkillType.NORMAL && skilldata.SkillType != (int)Data.eSkillType.PASSIVE && skilldata.SkillType != (int)Data.eSkillType.ACTIVE) { continue; } realSkillCount++; int skillDataIndex = skilldata.Index; CombatSkillItem skillItem = null; if (skillDataIndex < mDMono.transform.childCount) { skillItem = mDMono.transform.GetChild(skillDataIndex).GetMonoILRComponent <CombatSkillItem>(); } if (skillItem == null) { var go = GameObject.Instantiate(SkillItemTemplate.mDMono.gameObject) as GameObject; go.name = "Clone"; go.transform.SetParent(mDMono.transform, false); go.SetActive(true); skillItem = go.GetMonoILRComponent <CombatSkillItem>(); } if (skilldata != null) { skillItem.mDMono.name = ((Data.eSkillType)skilldata.SkillType).ToString() + skillDataIndex; skillItem.Fill(skilldata, skilldata.SkillType == (int)Data.eSkillType.NORMAL); } else { EB.Debug.LogError("skillData is null"); } } if (SceneLogic.BattleType == eBattleType.ChallengeCampaign || SceneLogic.BattleType == eBattleType.AlienMazeBattle) { realSkillCount++; if (!_hasSetBagSpace) { _hasSetBagSpace = true; mDMono.transform.localPosition -= new Vector3(SkillItemGrid.cellWidth, 0, 0); } BagBtn.gameObject.CustomSetActive(true); BagShadow.gameObject.CustomSetActive(CharacterData.ScrollTimes > 0); } SkillBGSprite.width = (779 - (4 - realSkillCount) * 162); SkillBGSprite.gameObject.CustomSetActive(true); for (int excessIndex = realSkillCount; ++excessIndex < mDMono.transform.childCount; ++excessIndex) { mDMono.transform.GetChild(excessIndex).gameObject.CustomSetActive(false); } SkillItemGrid.Reposition(); if (character_data.NormalSkillData != null) { SetTargetingInfo(character_data.NormalSkillData.ID, _COMMON_TYPE); } else { EB.Debug.LogError("Not Found NormalSkill For Character:" + character_data); } }