From 4071b771e4990acdd6b87c1cd10e2909fe72e98c Mon Sep 17 00:00:00 2001 From: mrsh Date: Tue, 21 Apr 2026 09:07:46 +0200 Subject: [PATCH] ajout end game --- src/main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index e9b5ba2..00cd703 100644 --- a/src/main.c +++ b/src/main.c @@ -48,7 +48,7 @@ int main () // Setup the back buffer for drawing (clear color and depth buffers) ClearBackground(BLACK); - DrawCircle(HorizontalPosition, VerticalPosition, 10, BLUE); + DrawRectangle(HorizontalPosition, VerticalPosition, 10, 10, BLUE); DrawCircle(positionXCollectible, positionYCollectible, 10, YELLOW); @@ -56,6 +56,13 @@ int main () DrawText(TextFormat("score : %d", point), 500,50,20,PINK); + if(point >= 10){ + DrawText("Emi la plus belle", 50,50,20,PINK); + if (IsKeyDown(74) ) { + point=0; + }; + }else{ + //up if (IsKeyDown(74) && VerticalPosition != 580 ) { // draw some text using the default font @@ -77,8 +84,6 @@ int main () // draw some text using the default font }; - if(point == 10){ - DrawText("Emi la plus belle", 50,50,20,PINK); } if (abs(positionXCollectible - HorizontalPosition) < 10 &&