Ejemplo n.º 1
0
    public override void Initialize()
    {
        base.Initialize();
        GameObject go = CommonApi.Find("Global");

        if (go == null)
        {
            throw new Exception("Not Found Global Object !");
        }
        corePoolSize = 5;
        maxPoolSize  = 20;
        //附属在GLobal执行协程
        attachedMono            = go.GetComponent <MonoBehaviour>();
        m_AsyncOperationQueue   = new PriorityQueue <Runnable>(Runnable.Compare);
        m_StartedCoroutineCount = 0;
        m_IdleCoroutineCount    = 0;
        m_StartedCoroutines     = new Dictionary <int, IEnumerator>();
        m_WaitForNewTask        = new WaitForSeconds(CheckNewTaskInterval);
    }