override public void SetActive(bool _active) { if (_active) { base.SetActive(true); mState = UISate.Showing; if (!PlayUIAni(UIAniType.Show)) { OnShowAnimationEnd(null); } } else { if (!gameObject.activeInHierarchy) { return; } mState = UISate.Hidden; if (!PlayUIAni(UIAniType.Hide)) { base.SetActive(false); OnHideAnimationEnd(null); } } }
virtual protected void OnHideAnimationEnd(string senderKey) { mState = UISate.Normal; base.SetActive(false); CallScriptFunctionByNameParams("OnHideAnimationEnd"); }
virtual protected void OnShowAnimationEnd(string senderKey) { PlayUIAni(UIAniType.Normal); mState = UISate.Normal; CallScriptFunctionByNameParams("OnShowAnimationEnd"); }