Beispiel #1
0
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var playable = ScriptPlayable <AlembicShotPlayable> .Create(graph);

            var behaviour = playable.GetBehaviour();

            m_stream = streamPlayer.Resolve(graph.GetResolver());
            behaviour.streamPlayer = m_stream;
            return(playable);
        }
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var playable = ScriptPlayable <AlembicShotPlayable> .Create(graph);

            var behaviour = playable.GetBehaviour();

            m_Stream = m_StreamPlayer.Resolve(graph.GetResolver());
            behaviour.streamPlayer      = m_Stream;
            behaviour.m_StartTimeOffset = m_StartOffset;
            behaviour.m_EndTimeClipOff  = m_EndOffset;
            behaviour.m_TimeScale       = m_TimeScale;
            behaviour.m_Cycle           = m_Cycle;
            return(playable);
        }
        public override PlayableHandle CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var handle = graph.CreateScriptPlayable <AlembicShotPlayable>();

            var playable = handle.GetObject <AlembicShotPlayable>();

            m_Stream = m_StreamPlayer.Resolve(graph.resolver);
            playable.streamPlayer      = m_Stream;
            playable.m_StartTimeOffset = m_StartOffset;
            playable.m_EndTimeClipOff  = m_EndOffset;
            playable.m_TimeScale       = m_TimeScale;
            playable.m_Cycle           = m_Cycle;
            return(handle);
        }
Beispiel #4
0
        void ClampPlayer(AlembicStreamPlayer player, double distance, int side, double clipIn)
        {
            for (int i = 0, n = _clampedPlayers.Count; i < n; ++i)
            {
                var x = _clampedPlayers[i];

                if (x.Item1 == player)
                {
                    if (x.Item2 > distance && x.Item3 != 0)
                    {
                        _clampedPlayers[i] = (player, distance, side, clipIn);
                    }

                    return;
                }
            }

            _clampedPlayers.Add((player, distance, side, clipIn));
        }