コード例 #1
0
        public override void ProcessFrame(Playable playable, FrameData info, object playerData)
        {
            texthandler = playerData as SubTitleHandler;

            if (texthandler == null)
            {
                return;
            }

            int inputCount = playable.GetInputCount();

            for (int i = 0; i < inputCount; i++)
            {
                ScriptPlayable <TextHandlerBehaviour> inputPlayable =
                    (ScriptPlayable <TextHandlerBehaviour>)playable.GetInput(i);
                TextHandlerBehaviour input = inputPlayable.GetBehaviour();
                if (!input.isInQueue && playable.GetInputWeight(i) > float.Epsilon)
                {
                    texthandler.NextInQueue(input.clipTextSo, input.Speed);
                    if (Application.isPlaying)
                    {
                        input.isInQueue = true;
                    }
                }
            }
        }
コード例 #2
0
        public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
        {
            var playable = ScriptPlayable <TextHandlerBehaviour> .Create(graph, template);

            TextHandlerBehaviour clone = playable.GetBehaviour();

            return(playable);
        }