Ejemplo n.º 1
0
        public SequentialMonoRunner(string name, bool mustSurvive = false)
        {
            UnityCoroutineRunner.InitializeGameObject(name, ref _go, mustSurvive);

            var runnerBehaviour = _go.AddComponent <RunnerBehaviourUpdate>();
            var runnerBehaviourForUnityCoroutine = _go.AddComponent <RunnerBehaviour>();
            var info = new UnityCoroutineRunner.StandardRunningTaskInfo {
                runnerName = name
            };

            runnerBehaviour.StartUpdateCoroutine(new UnityCoroutineRunner.Process
                                                     (_newTaskRoutines, _coroutines, _flushingOperation, info,
                                                     SequentialTasksFlushing,
                                                     runnerBehaviourForUnityCoroutine, StartCoroutine));
        }
Ejemplo n.º 2
0
        public EarlyUpdateMonoRunner(UpdateMonoRunner updateRunner, string name)
        {
            _go = updateRunner._go;

            var runnerBehaviour = _go.GetComponent <RunnerBehaviourUpdate>();
            var runnerBehaviourForUnityCoroutine = _go.GetComponent <RunnerBehaviour>();

            var info = new UnityCoroutineRunner.StandardRunningTaskInfo()
            {
                runnerName = name
            };

            runnerBehaviour.StartEarlyUpdateCoroutine(new UnityCoroutineRunner.Process
                                                          (_newTaskRoutines, _coroutines, _flushingOperation, info,
                                                          UnityCoroutineRunner.StandardTasksFlushing,
                                                          runnerBehaviourForUnityCoroutine, StartCoroutine));
        }
Ejemplo n.º 3
0
        public CoroutineMonoRunner(string name, bool mustSurvive = false)
        {
            _platformProfiler = new Svelto.Common.PlatformProfiler(name);
            UnityCoroutineRunner.InitializeGameObject(name, ref _go, mustSurvive);

            RunnerBehaviour runnerBehaviour = _go.AddComponent <RunnerBehaviour>();

            _runnerBehaviourForUnityCoroutine = _go.AddComponent <RunnerBehaviour>();

            _info = new UnityCoroutineRunner.StandardRunningTaskInfo {
                runnerName = name
            };

            runnerBehaviour.StartCoroutine(new UnityCoroutineRunner.Process(
                                               _newTaskRoutines, _coroutines, _flushingOperation, _info,
                                               UnityCoroutineRunner.StandardTasksFlushing,
                                               _runnerBehaviourForUnityCoroutine, StartCoroutine));
        }