// start one animation instance by return a recorder public BezierAnimationRecorder InstanceOneRecorder() { var recorder = new BezierAnimationRecorder(); recorder.currentClip = clips[entryIndex]; recorder.currentClip.StartPlay(); return(recorder); }
// Use this for initialization void Start() { _recorder = _animator.InstanceOneRecorder(); if (canPlay) { StartCoroutine(DelayPlayAnimation()); } }
// Update single Recorder public void UpdateRecorder(BezierAnimationRecorder recorder) { recorder.currentClip.Update(); if (recorder.currentClip.IsEnd) { recorder.currentClip = clips[recorder.currentClip.nextClip]; recorder.currentClip.StartPlay(); } }