/// <summary> /// 切换翅膀 /// </summary> void OnChangeToggle(GameObject go) { for (int i = 0; i < listGame.Count; i++) { if (listGame[i] != null && listGame[i].GetComponent <UIToggle>().value) { //刷新激活界面 WingItemUI wingItemUI = listGame[i].GetComponent <WingItemUI>(); WingRef info = null; if (wingItemUI != null) { info = wingItemUI.Info; } if (info != null && WingDicton.ContainsKey(info.id)) { wingActive.SetWingActiveUI(WingDicton[info.id] as WingInfo); if (notActiveGo != null) { notActiveGo.SetActive(false); } if (ActiveGo != null) { ActiveGo.SetActive(true); } curWingInfo = WingDicton[info.id] as WingInfo; RefreshModel(activeWing); } //刷新未激活界面 else if (info != null) { wingNotActive.SetWingNotActiveUI(info); if (notActiveGo != null) { notActiveGo.SetActive(true); } if (ActiveGo != null) { ActiveGo.SetActive(false); } curWingInfo = new WingInfo(info); RefreshModel(notActiveWing); } } } }
/// <summary> /// 淬炼后刷新 /// </summary> void OnWingUpdate() { for (int i = 0; i < listGame.Count; i++) { if (listGame[i] != null && listGame[i].GetComponent <UIToggle>().value) { WingRef info = listGame[i].GetComponent <WingItemUI>().Info; if (info != null && WingDicton.ContainsKey(info.id)) { wingActive.SetWingActiveUI(WingDicton[info.id] as WingInfo); curWingInfo = WingDicton[info.id] as WingInfo; if (GameCenter.wingMng.isRefreshEffect) { GameCenter.wingMng.isRefreshEffect = false; RefreshModel(activeWing); } } } } }