diff --git a/.gitignore b/.gitignore index c218293..a1cf51b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /gg_data.py +/screenshots diff --git a/gg.py b/gg.py index 9f661d9..56f5c23 100644 --- a/gg.py +++ b/gg.py @@ -106,7 +106,7 @@ def collision(num, ox, oy, nx, ny, flipped): def playLevel(num): loadLevel(num) - x, y, vy, ay = 5, 90, 0, 1 + x, y, vy, ay = 5, 16*[6,9,4][num], 0-(num==2), 1-2*(num==2) frame = 0 action = False standing = False @@ -132,7 +132,28 @@ def playLevel(num): except KeyboardInterrupt: action = standing +def startcard(): + clear_screen() + draw_string(152, 20, "Gravity Guy !", (0,0,0), "small") + draw_string(15, 40, "Inversez la sens de gravitation en appuyant sur la", (0,0,0), "small") + draw_string(15, 55, "touche [AC/ON] pour sauter de plateforme en", (0,0,0), "small") + draw_string(15, 70, "platforme et atteindre la fin de chaque niveau.", (0,0,0), "small") + draw_string(15, 90, "[AC/ON]: C'est parti !", (0,0,0), "small") + show_screen() + + try: + while True: + pass + except KeyboardInterrupt: + pass + +def endcard(): + clear_screen() + draw_string(136, 84, "Bravo Gravity Guy!", (0,0,0), "small") + show_screen() + def main(): + startcard() num = 0 while True: b = playLevel(num) @@ -143,6 +164,7 @@ def main(): break elif num+1 == len(levels): print("Bravo!") + endcard() break else: print("Niveau suivant?") diff --git a/maps.tmx b/maps.tmx index fb56d2d..17cd14b 100644 --- a/maps.tmx +++ b/maps.tmx @@ -1,5 +1,5 @@ - + @@ -17,10 +17,10 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,3,4,3,3,4 - + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,2,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,2,2,0,0,2,2,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,6,6,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