Example #1
0
    private void OverrideBtoA()
    {
        // swap A and B
        SAnimation temp = m_A;

        m_A = m_B;
        m_B = temp;

        m_MixerManager.OverrideInputBtoA();
    }
Example #2
0
    public SAnimationLayer(Animator animator, Playable output, int layerIndex)
    {
        PlayableGraph graph = output.GetGraph();

        m_MixerManager = new SMixer(animator, graph);
        graph.Connect(m_MixerManager.m_Mixer, 0, output, layerIndex);

        m_A = new SAnimation();
        m_B = new SAnimation();
    }
    // ========================================================================== //

    #region Private

    /* private - [Proc] Function
     * 로직을 처리(Process Local logic)           */

    private IEnumerator CoUpdateRandomAnimation()
    {
        if (_listRandomAnimation.Count == 0)
        {
            _pSpineController.DoPlayAnimation_Loop(strDefaultAnimationName);
        }
        else
        {
            while (true)
            {
                SAnimation pCurrentRandomAnimation = CManagerRandomTable <SAnimation> .instance[_iInstanceID].GetRandomItem();
                _pSpineController.DoPlayAnimation(pCurrentRandomAnimation.strAnimation);

                yield return(new WaitForSeconds(pCurrentRandomAnimation.GetRandomDuration()));
            }
        }
    }
Example #4
0
    private void Create(SAnimation targetSoket, SPlayDesc info)
    {
        if (targetSoket.IsValid)
        {
            targetSoket.Clear();
        }

        AnimationClipPlayable p = AnimationClipPlayable.Create(m_MixerManager.m_Mixer.GetGraph(), info.clip);

        if (targetSoket == m_A)
        {
            m_MixerManager.Connect(p, 0);
        }
        else
        {
            m_MixerManager.Connect(p, 1);
        }

        targetSoket.Play(p, info);
    }