Exemplo n.º 1
0
void CCPomelo::dispatchCallbacks(float delta){
    int _taskCount = 0;
    pthread_mutex_lock(&task_count_mutex);
    _taskCount = task_count;
    pthread_mutex_unlock(&task_count_mutex);
    if (_taskCount == 0) return;
    dispatchNotify();
    dispatchEvent();
    dispatchRequest();
}
Exemplo n.º 2
0
void CCPomelo::dispatchCallbacks(float delta){
    dispatchNotify();
    dispatchEvent();
    dispatchRequest();
    if (connect_status==1) {
        connectCallBack();
    }
    
    pthread_mutex_lock(&task_count_mutex);
    
    if (task_count==0) {
        CCDirector::sharedDirector()->getScheduler()->pauseTarget(this);
    }
    pthread_mutex_unlock(&task_count_mutex);
    
}