public SPlayDesc(AnimationClip _clip, float _blendinTime, SPlayDesc.eWRAP_MODE wrap) { blendinTime = _blendinTime; blendoutTime = 0; blendOutAfterEnd = false; clip = _clip; WrapMode = wrap; if (wrap == SPlayDesc.eWRAP_MODE.AUTO) { WrapMode = _clip.isLooping ? SPlayDesc.eWRAP_MODE.LOOP : SPlayDesc.eWRAP_MODE.ONCE; } }
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); }