예제 #1
0
    void Start()
    {
        IAvatar playbackAvatar = RiggedPlaybackAvatar as IAvatar ?? PlaybackAvatar;

        playbackAvatar.SwapSkeletonProvider(Playback);
        Playback.Reset();
    }
예제 #2
0
    public void Init(Technique t)
    {
        technique = t;
        comparer  = SkeletonComparer.GetComparer(CurveProvider.Curve);

        VariableHolder.RecordedSkeletonFrames = t.TechniqueFrames;
        PreviewPlayback.RefreshSkeletonFrames();
        FinishedPlayback.RefreshSkeletonFrames();

        PlaybackAvatar.SwapSkeletonProvider(PreviewPlayback);
        UserAvatar.SwapSkeletonProvider(CurrentUserTracker.Instance);

        PlaybackAvatar.SetEnabled(true);
        UserAvatar.SetEnabled(true);
    }
예제 #3
0
    public void SetupTrainingFinished(IEnumerable <Skeleton> recordedFrames)
    {
        VariableHolder.RecordedSkeletonFrames = recordedFrames.Select(s => (SerializableSkeleton)s).ToArray();
        UserPlayback.RefreshSkeletonFrames();
        UserAvatar.SwapSkeletonProvider(UserPlayback);
        TechniqueAvatar.SwapSkeletonProvider(TechniquePlayback);

        int minEndFrame = Mathf.Min(TechniquePlayback.EndFrame, UserPlayback.EndFrame);

        UserPlayback.SetStartEndFrames(0, minEndFrame);
        TechniquePlayback.SetStartEndFrames(0, minEndFrame);

        UserPlayback.Reset();
        TechniquePlayback.Reset();
    }