fixed sound playback of ship destroyed
This commit is contained in:
@@ -29,6 +29,7 @@ class Model : public Engine::ModelBase {
|
||||
void ReloadLevel();
|
||||
void ProceedToNextLevel ();
|
||||
int GetPlayerLives () { return mPlayerLives; };
|
||||
void SetPlayerLives (int lives) { mPlayerLives = lives; };
|
||||
unsigned int GetPoints () { return mPoints; };
|
||||
std::string GetPlayerName() { return mPlayerName; };
|
||||
void SetPlayerName(const std::string &name) {
|
||||
|
||||
@@ -601,6 +601,7 @@ void View::DrawUiGameOver() {
|
||||
// We do not want the background to show the remaining bits of the game
|
||||
GetModel()->SetGameState(GameStatePaused);
|
||||
|
||||
PopViewState();
|
||||
PopViewState();
|
||||
PushViewState(ViewStateShowHighscore);
|
||||
}
|
||||
@@ -609,6 +610,10 @@ void View::DrawUiGameOver() {
|
||||
void View::DrawUiLevelIntro() {
|
||||
SelectFont ("console.ttf size=23");
|
||||
|
||||
if (level_assemble_mode) {
|
||||
GetModel()->SetPlayerLives(100);
|
||||
}
|
||||
|
||||
stringstream level_info_stream;
|
||||
level_info_stream << "Level " << GetModel()->GetCurrentLevelIndex() + 1;
|
||||
|
||||
|
||||
@@ -165,6 +165,9 @@ int main (int argc, char* argv[]) {
|
||||
Engine::RunCommand ("exec config.rc");
|
||||
|
||||
Engine::PlayMusic (Engine::GetResourceFullPath("/data/sounds/intro_music.ogg"));
|
||||
Engine::LoadSound(Engine::GetResourceFullPath("/data/sounds/thrust.wav"));
|
||||
Engine::LoadSound(Engine::GetResourceFullPath("/data/sounds/ship_destroyed.wav"));
|
||||
Engine::LoadSound(Engine::GetResourceFullPath("/data/sounds/rock_destroyed.wav"));
|
||||
|
||||
// load highscore list (either remote or local, depending on settings)
|
||||
asteroids::GetModel()->LoadHighscoreList();
|
||||
|
||||
Reference in New Issue
Block a user