Merge pull request 'ajout end game' (#2) from dev into main
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -48,7 +48,7 @@ int main ()
|
|||||||
// Setup the back buffer for drawing (clear color and depth buffers)
|
// Setup the back buffer for drawing (clear color and depth buffers)
|
||||||
ClearBackground(BLACK);
|
ClearBackground(BLACK);
|
||||||
|
|
||||||
DrawCircle(HorizontalPosition, VerticalPosition, 10, BLUE);
|
DrawRectangle(HorizontalPosition, VerticalPosition, 10, 10, BLUE);
|
||||||
|
|
||||||
DrawCircle(positionXCollectible, positionYCollectible, 10, YELLOW);
|
DrawCircle(positionXCollectible, positionYCollectible, 10, YELLOW);
|
||||||
|
|
||||||
@@ -56,6 +56,13 @@ int main ()
|
|||||||
DrawText(TextFormat("score : %d", point), 500,50,20,PINK);
|
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
|
//up
|
||||||
if (IsKeyDown(74) && VerticalPosition != 580 ) {
|
if (IsKeyDown(74) && VerticalPosition != 580 ) {
|
||||||
// draw some text using the default font
|
// draw some text using the default font
|
||||||
@@ -77,8 +84,6 @@ int main ()
|
|||||||
// draw some text using the default font
|
// draw some text using the default font
|
||||||
};
|
};
|
||||||
|
|
||||||
if(point == 10){
|
|
||||||
DrawText("Emi la plus belle", 50,50,20,PINK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (abs(positionXCollectible - HorizontalPosition) < 10 &&
|
if (abs(positionXCollectible - HorizontalPosition) < 10 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user