private void RunesExtension(GameObject obj) { if (null != obj) { bool isNeedRefresh = true; RunesItem tempRunesItem = obj.GetComponent <RunesItem>(); if (null != this.lastRune && this.lastRune.RunePosition == tempRunesItem.RunePosition) { isNeedRefresh = false; } int limitLock = (int)tempRunesItem.LimitLock; if (limitLock == 0) { Singleton <TipView> .Instance.ShowViewSetText("召唤师等级" + tempRunesItem.RankRune + "级可使用", 1f); } else if (limitLock == 1) { GridHelper.FillGrid <RunesItem>(this.gridRunes, this.runesItem, this.Num, delegate(int idx, RunesItem comp) { comp.ChangeState(tempRunesItem); }); RunesPara runesPara = default(RunesPara); this.lastRune = tempRunesItem; runesPara.isNeedRefresh = isNeedRefresh; runesPara.runesItem = this.lastRune; MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewClickRune, runesPara, false); } } }
private void Initialize() { this.transHeroRunes = base.transform.Find("HeroRunes"); this.btnAllDemount = this.transHeroRunes.Find("BtnDemountAll"); this.gridRunes = this.transHeroRunes.Find("Grid").GetComponent <UIGrid>(); this.gridAttributes = this.transHeroRunes.Find("Attribute/Grid").GetComponent <UIGrid>(); this.runesItem = Resources.Load <RunesItem>("Prefab/UI/Sacrificial/RunesItem"); this.propAttribute = Resources.Load <PropAttribute>("Prefab/UI/Sacrificial/PropAttribute"); this.transFilterArea = base.transform.Find("FilterArea"); this.transProcessBar = base.transform.Find("Progress Bar"); UIEventListener.Get(this.btnAllDemount.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickAllDemount); this.Num = BaseDataMgr.instance.GetTypeDicByType <SysHeroRunsUnlockVo>().Keys.Count; }
private void OnMsg_runesviewChangeToggle(MobaMessage msg) { if (msg.Param != null) { if (Singleton <RunesOverView> .Instance != null) { this.heroNPC = Singleton <RunesOverView> .Instance.HeroNpc; } RunesFunctionType runesFunctionType = (RunesFunctionType)((int)msg.Param); this.transHeroRunes.gameObject.SetActive(runesFunctionType == RunesFunctionType.Inlay); this.btnAllDemount.gameObject.SetActive(runesFunctionType == RunesFunctionType.Inlay); this.InitGroove(runesFunctionType == RunesFunctionType.Inlay); if (null != this.lastRune) { this.lastRune = null; } } }
private void SkipToAnotherRune() { List <RunesItem> list = new List <RunesItem>(); if (this.gridRunes.transform.childCount > 0) { for (int i = 0; i < this.gridRunes.transform.childCount; i++) { list.Add(this.gridRunes.transform.GetChild(i).GetComponent <RunesItem>()); } } list = list.FindAll((RunesItem obj) => obj.LimitLock == Limit_lock.unlocked && obj.ModelID == 0); int num = -1; for (int num2 = 0; num2 != list.Count; num2++) { if (list[num2].RunePosition > this.lastRune.RunePosition) { num = num2; break; } num = -1; } if (list.Count > 0 && num == -1) { num = 0; } if (num == -1) { return; } this.lastRune = list[num]; bool isNeedRefresh = true; GridHelper.FillGrid <RunesItem>(this.gridRunes, this.runesItem, this.Num, delegate(int idx, RunesItem comp) { comp.ChangeState(this.lastRune); }); RunesPara runesPara = default(RunesPara); runesPara.isNeedRefresh = isNeedRefresh; runesPara.runesItem = this.lastRune; MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewClickRune, runesPara, false); }