diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-05-14 17:55:17 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-05-14 17:55:17 +0000 |
commit | 24126a2f13553d4fd516fb0dc727906b324e9c56 (patch) | |
tree | 200ccfe66701510cf175d4bf9258f885f83df1c9 /src/gameScreen.c | |
parent | cffca0d01bf99d2eb917f6dc923555ffa0011d88 (diff) | |
download | PenguinYippies-main.tar.gz PenguinYippies-main.tar.bz2 PenguinYippies-main.zip |
Diffstat (limited to 'src/gameScreen.c')
-rw-r--r-- | src/gameScreen.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c index bbe5a65..68c1301 100644 --- a/src/gameScreen.c +++ b/src/gameScreen.c @@ -41,6 +41,15 @@ void initGameScreen(GameScreen* gameScreen, Game* game) BLACK ); + // Nap Time stuff. + gameScreen->napTimeButton = createTexturedButton( + &assets->textures[NAP_TIME_TEXTURE], + (Rectangle){700.0, 5.0, 100.0, 50.0}, + "", + WHITE, + BLACK + ); + gameScreen->nextShootingStoneCount = RUN_SHOOTER_GAME_COUNT_START; initShop(&gameScreen->shop, game); @@ -223,12 +232,17 @@ void updateGameScreen(GameScreen* gameScreen, Game* game) snprintf(stonesBuf, sizeof(stonesBuf), "%d", game->stones); DrawText(stonesBuf, 40.0, 5.0, 30, BLACK); - // Shooter game time. + // Shooter game stuff. if (game->stones >= gameScreen->nextShootingStoneCount) { - ++game->stones; - enterShooterScreen(game); - gameScreen->nextShootingStoneCount *= 5.0; + + // Show button to enter nap time. + if (updateTexturedButton(&gameScreen->napTimeButton)) + { + ++game->stones; + enterShooterScreen(game); + gameScreen->nextShootingStoneCount *= 5.0; + } } char nextShooterBuf[60]; |