void BaseScene::RunFrame() { FrameStart(); HandleEvents(); Update(); Render(screen); SDL_Flip(screen); FrameEnd(); }
LRESULT CGameApp::Run() { //游戏的主循环 MSG msg; memset(&msg,0,sizeof(msg)); while(msg.message!=WM_QUIT) { if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { TranslateMessage( &msg ); DispatchMessage( &msg ); } else { FrameStart(); Render(); FrameEnd(); } } UnregisterClass(m_szClassName, m_hInstance); return msg.wParam; }
void BaseScene::RunFrame() { FrameStart(); ProcessEvents(); Update(); FrameEnd(); }
void BaseScene::RunFrame(double delta) { FrameStart(); HandleEvents(); Update(delta); FrameEnd(); }