forked from jaygarcia/evade2-ldk-game
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request jaygarcia#4 from ModusCreateOrg/work
seems done. Boss needs to be tested. Code is in, but not sure it works
- Loading branch information
Showing
10 changed files
with
110 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// Created by Michael Schwartz on 11/10/20. | ||
// | ||
|
||
#include "GGameOverProcess.h" | ||
#include "GGameState.h" | ||
#include "GMainMenuState.h" | ||
#include "GCamera.h" | ||
|
||
GGameOverProcess::GGameOverProcess() : BProcess() { | ||
gGameState->mState = STATE_GAME_OVER; | ||
mTheta = 0; | ||
mTimer = 200; | ||
gCamera->vx = gCamera->vy = 0; | ||
gCamera->vz = CAMERA_WARP_VZ; | ||
gControls.Reset(); | ||
// TODO: @Jay game over sound here | ||
} | ||
|
||
GGameOverProcess::~GGameOverProcess() noexcept = default; | ||
|
||
TBool GGameOverProcess::RunBefore() { | ||
if (mTimer-- < 0) { | ||
gGame->SetState(GAME_STATE_MAIN_MENU); | ||
return EFalse; | ||
} | ||
return ETrue; | ||
} | ||
|
||
TBool GGameOverProcess::RunAfter() { | ||
mTheta += 6; | ||
gVectorFont->scale = 3; | ||
gVectorFont->color = COLOR_SHMOO; | ||
gVectorFont->print_string_rotatedx(53, 80, mTheta, "GAME OVER"); | ||
gVectorFont->scale = 1.5; | ||
gVectorFont->color = COLOR_WHITE; | ||
gVectorFont->printf(gGameState->mWave < 9 ? 50 : 45, 160, "WAVES SURVIVED: %d", gGameState->mWave - 1); | ||
return ETrue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Created by Michael Schwartz on 11/10/20. | ||
// | ||
|
||
#ifndef EVADE2_GGAMEOVERPROCESS_H | ||
#define EVADE2_GGAMEOVERPROCESS_H | ||
|
||
#include "Game.h" | ||
|
||
class GGameOverProcess : public BProcess { | ||
public: | ||
GGameOverProcess(); | ||
~GGameOverProcess(); | ||
|
||
public: | ||
TBool RunBefore(); | ||
TBool RunAfter(); | ||
protected: | ||
TFloat mTheta; | ||
TInt16 mTimer; | ||
}; | ||
|
||
|
||
#endif //EVADE2_GGAMEOVERPROCESS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.