Ejemplo n.º 1
0
        public void SceneGUISelected(PlayableDirectorLite _playable, TimelineClip _timelineClip, int _indicator)
        {
            float startFrame = _timelineClip.GetStartFrame();
            float endFrame   = _timelineClip.GetEndFrame();
            float progress   = (_indicator - startFrame) / (endFrame - startFrame);

            if (progress < 0 || progress > 1)
            {
                return;
            }

            Vector3 position = new Vector3(
                Easing.Tween(from.x, to.x, progress, ease),
                Easing.Tween(from.y, to.y, progress, ease),
                Easing.Tween(from.z, to.z, progress, ease)
                );

            Handles.DotHandleCap(0, position, Quaternion.identity, 0.1f, EventType.Repaint);
        }
        public void SceneGUISelected(PlayableDirectorLite _playable, TimelineClip _timelineClip, int _indicator)
        {
            float startFrame = _timelineClip.GetStartFrame();
            float endFrame   = _timelineClip.GetEndFrame();
            int   indicator  = TimelineLiteEditorWindow.Instance.IndicatorFrame;
            float progress   = (indicator - startFrame) / (endFrame - startFrame);

            if (progress < 0 || progress > 1)
            {
                return;
            }

            progress = Mathf.Clamp01(progress);
            Quaternion rotation = Quaternion.Euler(new Vector3(
                                                       Easing.Tween(from.x, to.x, progress, ease),
                                                       Easing.Tween(from.y, to.y, progress, ease),
                                                       Easing.Tween(from.z, to.z, progress, ease)
                                                       ));

            Handles.ArrowHandleCap(0, _playable.transform.position, rotation, 3, EventType.Repaint);
        }