Esempio n. 1
0
        //当前任务执行
        private void ExecuteCurrentTask()
        {
            _currentContent.OnExecute();

            Main.m_Event.Throw(this, Main.m_ReferencePool.Spawn <EventTaskContentExecute>().Fill(_currentContent));
            _currentContent = null;

            if (AllUndoneTaskContentCount > 0)
            {
                if (IsAutoChangeNext)
                {
                    if (_currentContentIndex < ContentAsset.Content.Count - 1)
                    {
                        _currentContentIndex += 1;
                    }
                    else
                    {
                        _currentContentIndex = 0;
                    }
                    BeginCurrentTask();
                }
            }
            else
            {
                End();
            }
        }
Esempio n. 2
0
        //进入下一任务
        private void ChangeNextTask()
        {
            _currentContent.OnExecute();

            Main.m_Event.Throw(this, Main.m_ReferencePool.Spawn <EventTaskContentExecute>().Fill(_currentContent));

            if (_currentContentIndex < ContentAsset.Content.Count - 1)
            {
                _currentContentIndex += 1;
                BeginCurrentTask();
            }
            else
            {
                End();
            }
        }