public void HideContent(CharactorUIBtnType type) { ResourceManager.SetSprite(this.listBtn.get_Item((int)type).GetComponent <Image>(), ResourceManager.GetIconSprite(this.btn1)); if (this.current != CharactorUIBtnType.None) { ResourceManager.SetSprite(this.listBtn.get_Item((int)this.current).GetComponent <Image>(), ResourceManager.GetIconSprite(this.btn2)); switch (this.current) { case CharactorUIBtnType.Element: if (this.elementUI != null) { this.elementUI.Show(false); } break; case CharactorUIBtnType.Rise: if (this.riseUI != null) { this.riseUI.Show(false); } break; } } this.current = type; }
public void OpenContent(CharactorUIBtnType type) { if (type == this.current) { return; } switch (type) { case CharactorUIBtnType.Element: if (this.elementUI == null) { this.elementUI = (UIManagerControl.Instance.OpenUI("ElementUI", base.get_transform(), false, UIType.FullScreen) as ElementUI); this.elementUI.ResetUI(); } else { this.elementUI.Show(true); } break; case CharactorUIBtnType.Rise: if (this.riseUI == null) { this.riseUI = (UIManagerControl.Instance.OpenUI("RiseUI", base.get_transform(), false, UIType.FullScreen) as RiseUI); } else { this.riseUI.Show(true); } break; } this.HideContent(type); }