Exemplo n.º 1
0
    public void ForwardOver()
    {
        //检查所有动画是否播放完
        bool isEnd = true;

        foreach (var obj in AniObjs)
        {
            FrameAni fa = obj.GetComponent <FrameAni>();
            if (!fa.IsEnd())
            {
                isEnd = false;
                break;
            }
        }

        Debug.Log("ForwardOver isEnd=" + isEnd + ",_gunDisappear=" + _gunDisappear);
        if (isEnd && _gunDisappear)
        {
            _status = 2;
            //设置动画组件隐藏
            foreach (var obj in AniObjs)
            {
                obj.SetActive(false);
            }
            ObjectEventDispatcher.dispatcher.dispatchEvent(new UEvent(EventTypeName.Victory), null);
        }
    }
Exemplo n.º 2
0
    public void ForwardOver()
    {
        //检查所有动画是否播放完
        bool isEnd = true;

        foreach (var obj in AniObjs)
        {
            FrameAni fa = obj.GetComponent <FrameAni>();
            if (!fa.IsEnd())
            {
                isEnd = false;
                break;
            }
        }

        if (isEnd)
        {
            _status = 3;
            //设置隐藏的物体真正隐藏
            foreach (var obj in HideObjs)
            {
                obj.SetActive(false);
            }

            //设置动画组件隐藏
            foreach (var obj in AniObjs)
            {
                obj.SetActive(false);
            }

            //设置目标组件展示
            foreach (var obj in TargetObjs)
            {
                obj.SetActive(true);
            }
        }
    }