public void Play(string state, uint layer, float _blendinTime, float _blendoutTime, bool _blendOutAfterEnd = true) { AnimationClip _clip = GetClip(state); if (_clip == null) { return; } SPlayDesc info = new SPlayDesc(_clip, _blendinTime, _blendoutTime, _blendOutAfterEnd); m_Layer[layer].Play(info); }
public void Play(string state, uint layer, float _blendinTime, SPlayDesc.eWRAP_MODE wrap = SPlayDesc.eWRAP_MODE.AUTO) { AnimationClip _clip = GetClip(state); if (_clip == null) { return; } SPlayDesc info = new SPlayDesc(_clip, _blendinTime, wrap); m_Layer[layer].Play(info); }
public void Play(SPlayDesc info) { if (m_A.IsValid && info.blendinTime > 0) { // crossfade current animation Create(m_B, info); } else { m_B.Clear(); Create(m_A, info); } }
public void Play(AnimationClipPlayable playable, SPlayDesc info) { PlayInfo = info; m_Playable = playable; if (PlayInfo.blendinTime == 0) { Weight = 1; } else { Weight = 0; } }
public void Clear() { if (IsValid == false) { return; } if (m_Playable.IsValid()) { m_Playable.GetGraph().DestroyPlayable(m_Playable); m_Playable = new AnimationClipPlayable { }; } PlayInfo = new SPlayDesc { }; Weight = 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); }