// Start is called before the first frame update void Start() { Initialize(sendFrameReadyEvents: false); videoPlayer.playOnAwake = false; videoPlayer.isLooping = false; standUpClip.SetAnimationClip(videoPlayer); ChangeState(new VStandingState(this)); OnStandCommand?.Invoke(); }
public void SetAnimationClip(VideoPlayer videoPlayer, LookDirection lookDirection) { switch (lookDirection) { case LookDirection.UP: clipUp.SetAnimationClip(videoPlayer); break; case LookDirection.RIGHT: clipRight.SetAnimationClip(videoPlayer); break; case LookDirection.DOWN: clipDown.SetAnimationClip(videoPlayer); break; case LookDirection.LEFT: clipLeft.SetAnimationClip(videoPlayer); break; default: throw new UndefinedLookDirectionException(); } }