/* Overridden GameAction which can be modified */ void SimpleDemo::GameAction() { // If too early to act then do nothing if ( !IsTimeToActWithSleep() ) return; // Don't act for another 15 ticks SetTimeToAct( 15 ); // Tell all objects to update themselves UpdateAllObjects( GetTime() ); }
/* Sub-class should actually do something, if relevant e.g. move the player or any other sprites */ void BaseEngine::GameAction() { // If too early to act then do nothing if ( !IsTimeToActWithSleep() ) return; // Don't act for another 15 ticks SetTimeToAct( 15 ); // Tell all objects to update themselves. // If they need the screen to redraw then they should say so, so that GameRender() will // call the relevant function later. UpdateAllObjects( GetTime() ); }