void DreamWebEngine::waitForVSync() { processEvents(); if (!_turbo) { while (!_vSyncInterrupt) { _system->delayMillis(10); } setVSyncInterrupt(false); } doShake(); doFade(); _system->updateScreen(); }
void GameEntityView::onShouldReact(CCObject* e) { GameEntityReactEvt* evt = dynamic_cast<GameEntityReactEvt*>(e); if( evt == NULL ) return; //react to effect if( evt->react.isString() ) { std::string react = evt->react.asString(); if( react.compare("shake") == 0 ) { doShake(); }else if( react.compare("burn") == 0 ) { doBurn(); }else if( react.compare("lifedrain") == 0 ) { doLifedrain( evt->source->getOrigin() ); }else if( react.compare("heal") == 0 ) { doHeal(); } } }