/// <summary> /// 显示和隐藏某个主界面 /// </summary> protected void ShowSingleMain(string wndPrefab, bool _show) { GUIBase wnd = GameCenter.uIMng.GetGui <GUIBase>(wndPrefab); if (wnd != null) { UIPlayAnimation playAnimation = wnd.GetComponent <UIPlayAnimation>(); if (playAnimation != null) { bool nowState = !stateDic.ContainsKey(wnd.name)?true:stateDic[wnd.name]; //当前显示状态 if (_show == false && nowState == true) { playAnimation.PlayForward(); //此方向都是隐藏UI stateDic[wnd.name] = false; } if (_show == true && nowState == false) { playAnimation.PlayReverse(); //此方向都是显示UI stateDic[wnd.name] = true; } if (_show == true && nowState == true && !stateDic.ContainsKey(wnd.name)) //初始情况 { playAnimation.PlayReverse(); stateDic[wnd.name] = true; } } } }
private void Awake() { uian = GetComponent <UIPlayAnimation>(); uian.PlayForward(); uian.Play(false); uian.animator.speed = 0; }
static public int PlayForward(IntPtr l) { try { UIPlayAnimation self = (UIPlayAnimation)checkSelf(l); self.PlayForward(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public void PlayForward() { uian.animator.speed = 1; if (uian != null) { uian.PlayForward(); } if (playRight != null) { playRight.Invoke(); } }
public void ShowMenu(bool show) { MainFightWnd wnd = GameCenter.uIMng.GetGui <MainFightWnd>(); if (wnd != null) { UIPlayAnimation playAnimation = wnd.GetComponent <UIPlayAnimation>(); if (show) { playAnimation.PlayReverse(); } else { playAnimation.PlayForward(); } } }
public void ShowMap(bool _showMap) { LittleMapWnd wnd = GameCenter.uIMng.GetGui <LittleMapWnd>(); if (wnd != null) { UIPlayAnimation playAnimation = wnd.GetComponent <UIPlayAnimation>(); if (_showMap) { playAnimation.PlayReverse(); } else { playAnimation.PlayForward(); } } }
public void PlayAni() { aniTrans.gameObject.SetActive(true); _play.PlayForward(); }