|
@@ -90,8 +90,10 @@ bool Game::startup()
|
|
|
_animationController = new AnimationController();
|
|
_animationController = new AnimationController();
|
|
|
_animationController->initialize();
|
|
_animationController->initialize();
|
|
|
|
|
|
|
|
|
|
+ #if 0
|
|
|
_audioController = new AudioController();
|
|
_audioController = new AudioController();
|
|
|
_audioController->initialize();
|
|
_audioController->initialize();
|
|
|
|
|
+ #endif
|
|
|
|
|
|
|
|
_physicsController = new PhysicsController();
|
|
_physicsController = new PhysicsController();
|
|
|
_physicsController->initialize();
|
|
_physicsController->initialize();
|
|
@@ -111,8 +113,10 @@ void Game::shutdown()
|
|
|
_animationController->finalize();
|
|
_animationController->finalize();
|
|
|
SAFE_DELETE(_animationController);
|
|
SAFE_DELETE(_animationController);
|
|
|
|
|
|
|
|
|
|
+ #if 0
|
|
|
_audioController->finalize();
|
|
_audioController->finalize();
|
|
|
SAFE_DELETE(_audioController);
|
|
SAFE_DELETE(_audioController);
|
|
|
|
|
+ #endif
|
|
|
|
|
|
|
|
_physicsController->finalize();
|
|
_physicsController->finalize();
|
|
|
SAFE_DELETE(_physicsController);
|
|
SAFE_DELETE(_physicsController);
|
|
@@ -130,7 +134,9 @@ void Game::pause()
|
|
|
_state = PAUSED;
|
|
_state = PAUSED;
|
|
|
_pausedTimeLast = Platform::getAbsoluteTime();
|
|
_pausedTimeLast = Platform::getAbsoluteTime();
|
|
|
_animationController->pause();
|
|
_animationController->pause();
|
|
|
|
|
+ #if 0
|
|
|
_audioController->pause();
|
|
_audioController->pause();
|
|
|
|
|
+ #endif
|
|
|
_physicsController->pause();
|
|
_physicsController->pause();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -142,7 +148,9 @@ void Game::resume()
|
|
|
_state = RUNNING;
|
|
_state = RUNNING;
|
|
|
_pausedTimeTotal += Platform::getAbsoluteTime() - _pausedTimeLast;
|
|
_pausedTimeTotal += Platform::getAbsoluteTime() - _pausedTimeLast;
|
|
|
_animationController->resume();
|
|
_animationController->resume();
|
|
|
|
|
+ #if 0
|
|
|
_audioController->resume();
|
|
_audioController->resume();
|
|
|
|
|
+ #endif
|
|
|
_physicsController->resume();
|
|
_physicsController->resume();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -175,13 +183,16 @@ void Game::frame()
|
|
|
|
|
|
|
|
// Update the scheduled and running animations.
|
|
// Update the scheduled and running animations.
|
|
|
_animationController->update(elapsedTime);
|
|
_animationController->update(elapsedTime);
|
|
|
|
|
+
|
|
|
// Update the physics.
|
|
// Update the physics.
|
|
|
_physicsController->update(elapsedTime);
|
|
_physicsController->update(elapsedTime);
|
|
|
// Application Update.
|
|
// Application Update.
|
|
|
update(elapsedTime);
|
|
update(elapsedTime);
|
|
|
|
|
|
|
|
// Audio Rendering.
|
|
// Audio Rendering.
|
|
|
|
|
+ #if 0
|
|
|
_audioController->update(elapsedTime);
|
|
_audioController->update(elapsedTime);
|
|
|
|
|
+ #endif
|
|
|
// Graphics Rendering.
|
|
// Graphics Rendering.
|
|
|
render(elapsedTime);
|
|
render(elapsedTime);
|
|
|
|
|
|
|
@@ -250,4 +261,4 @@ void Game::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactI
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
+}
|