示例#1
0
    public void Show(bool force = true)
    {
        CacheGameObject.SetActive(true);

        if (force)
        {
            Transform parent = CacheGameObject.transform.parent;
            do
            {
                if (parent == null)
                {
                    break;
                }
                parent.gameObject.SetActive(true);
                parent = parent.parent;
            } while (CacheGameObject.activeInHierarchy == false);
        }

        // 다른 UI들보다 먼저 보이도록 하이어라키 가장 아래로 내리자.
        CacheGameObject.transform.SetAsLastSibling();

        OnShow();
    }
示例#2
0
 /// <summary>
 /// 倒序播放动画 延迟
 /// </summary>
 public override void PlayReverseDelay()
 {
     CacheGameObject.SetActive(true);
     Play(to, from);
 }
示例#3
0
 /// <summary>
 /// 顺序播放动画 延迟
 /// </summary>
 public override void PlayForwardDelay()
 {
     CacheGameObject.SetActive(true);
     Play(from, to);
 }
示例#4
0
文件: BaseUI.cs 项目: RSNDM/TestUnity
 /// <summary>
 /// 显示当前UI
 /// </summary>
 /// <param name="param">附加参数</param>
 public void Show(object param=null)
 {
     CacheGameObject.SetActive(true);
 }
示例#5
0
文件: BaseUI.cs 项目: RSNDM/TestUnity
 /// <summary>
 /// 隐藏当前界面
 /// </summary>
 public void Hide()
 {
     CacheGameObject.SetActive(false);
 }