From 0a76c097ce385f989c49eaf074d2f7dcc05a8c64 Mon Sep 17 00:00:00 2001 From: nathansmith117 Date: Sun, 17 Mar 2024 15:07:05 -0600 Subject: Fake made with unity to fool the teacher --- src/game.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/game.c') diff --git a/src/game.c b/src/game.c index cfbfbea..8177fbd 100644 --- a/src/game.c +++ b/src/game.c @@ -23,10 +23,34 @@ void initGame(Game* game) game->screenTexture = LoadRenderTexture(WINDOW_WIDTH, WINDOW_HEIGHT); game->stones = 0; + + game->madeWithUnity = createAnimation(&game->assets.animations[MADE_WITH_UNITY_ANIMATION], 0.2); + game->madeWithUnity.repeat = false; + playAnimation(&game->madeWithUnity); } void updateGame(Game* game) { + if (game->madeWithUnity.playing) + { + runAnimation(&game->madeWithUnity); + + BeginDrawing(); + + DrawTexturePro( + game->madeWithUnity.texture, + (Rectangle){0.0, 0.0, game->madeWithUnity.width, game->madeWithUnity.height}, + (Rectangle){0.0, 0.0, GetScreenWidth(), GetScreenHeight()}, + Vector2Zero(), + 0.0, + WHITE + ); + + EndDrawing(); + + return; + } + // Draw screen. BeginTextureMode(game->screenTexture); @@ -67,5 +91,7 @@ void closeGame(Game* game) closeClickies(&game->clickies); UnloadRenderTexture(game->screenTexture); + closeAnimation(&game->madeWithUnity); + CloseWindow(); } -- cgit v1.2.3