diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-03-17 21:07:05 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-03-17 21:07:05 +0000 |
commit | 0a76c097ce385f989c49eaf074d2f7dcc05a8c64 (patch) | |
tree | 1a88c2f0c7d1dd4a6337253e6927302bcfb0bc7d /src/game.c | |
parent | cb6d023ffb7e24d024b2ab9603ced1684a62d137 (diff) | |
download | PenguinYippies-0a76c097ce385f989c49eaf074d2f7dcc05a8c64.tar.gz PenguinYippies-0a76c097ce385f989c49eaf074d2f7dcc05a8c64.tar.bz2 PenguinYippies-0a76c097ce385f989c49eaf074d2f7dcc05a8c64.zip |
Fake made with unity to fool the teacher
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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(); } |