aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameScreen.c
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-05-10 16:33:33 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-05-10 16:33:33 +0000
commitfca307d6af08116f675e0d04e5ace2e353ec718c (patch)
tree9cc4d7ad1960f72ef8730f9260bd985867130419 /src/gameScreen.c
parent314b234fb1cc5a21bbcba414e7e9ffdeafd8a753 (diff)
downloadPenguinYippies-fca307d6af08116f675e0d04e5ace2e353ec718c.tar.gz
PenguinYippies-fca307d6af08116f675e0d04e5ace2e353ec718c.tar.bz2
PenguinYippies-fca307d6af08116f675e0d04e5ace2e353ec718c.zip
Better stone count for shooter game
Diffstat (limited to 'src/gameScreen.c')
-rw-r--r--src/gameScreen.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c
index 4833bc7..cc50f2e 100644
--- a/src/gameScreen.c
+++ b/src/gameScreen.c
@@ -33,6 +33,8 @@ void initGameScreen(GameScreen* gameScreen, Game* game)
BLACK
);
+ gameScreen->nextShootingStoneCount = RUN_SHOOTER_GAME_COUNT_START;
+
initShop(&gameScreen->shop, game);
setGameScreenTool(gameScreen, CLICKER_TOOL);
@@ -200,12 +202,17 @@ void updateGameScreen(GameScreen* gameScreen, Game* game)
DrawText(stonesBuf, 40.0, 5.0, 30, BLACK);
// Shooter game time.
- if (game->stones % RUN_SHOOTER_GAME_EVERY == 0 && game->stones >= RUN_SHOOTER_GAME_EVERY)
+ if (game->stones >= gameScreen->nextShootingStoneCount)
{
++game->stones;
enterShooterScreen(game);
+ gameScreen->nextShootingStoneCount *= 2.5;
}
+ char nextShooterBuf[60];
+ snprintf(nextShooterBuf, sizeof(nextShooterBuf), "Next sleepy time is at %d stones", gameScreen->nextShootingStoneCount);
+ DrawText(nextShooterBuf, 350.0, 5.0, 20, BLACK);
+
updateGameScreenNavigation(gameScreen, game);
updateGameScreenTool(gameScreen, game); // This should go before tool bar update because of how clicks work.
updateGameScreenToolBar(gameScreen, game);