Пример #1
0
    /// <summary>
    /// 隐藏蝴蝶
    /// </summary>
    public void HideButterflay(bool isInit = false)
    {
        if (Butterflay == null)
        {
            return;
        }

        _isPlayButterflyAnim            = false;
        Butterflay.transform.localScale = Vector3.zero;
        //ButterflyAnim.StopPlayback();
        Butterflay.SetActive(false);
        //Butterflay.GetComponent<CubismRenderController>().SortingOrder = -3;
    }
Пример #2
0
    private void ShowButterflay(string butterflyAnimName)
    {
        if (Butterflay == null)
        {
            return;
        }

        _isPlayButterflyAnim = true;
        Butterflay.SetActive(true);
        //Butterflay.GetComponent<CubismRenderController>().SortingOrder = -3;
        //Butterflay.transform.localScale = Vector3.zero;
        Butterflay.transform.DOScale(Vector3.one, 0.1f);//.onComplete = ()=> { Butterflay.GetComponent<CubismRenderController>().SortingOrder = 100; };
        ButterflyAnim.SetTrigger(butterflyAnimName);
    }