Commit 175e3cfa92f1e3b25df225a69358359cd9b0a5c6

Authored by Geoffrey PREUD'HOMME
1 parent 57f5b105

Arrêt après fin

Showing 1 changed file with 14 additions and 1 deletions   Show diff stats
scene6.lua
... ... @@ -22,6 +22,7 @@ function scene6_load()
22 22 shakeamount = 10
23 23  
24 24 fade = 0
  25 + ended = false
25 26  
26 27 playerx = playerx or 50
27 28 landingx = landingx or 50
... ... @@ -103,8 +104,10 @@ function scene6_update(dt)
103 104 to = i
104 105 end
105 106 end
106   -
  107 +
107 108 if starttimer >= 15.7 and starttimer -dt < 15.7 then
  109 + print(string.format("SCORE:%d", math.ceil(points*scoremul)));
  110 + ended = true
108 111 staralpha = 1
109 112  
110 113 stars = {}
... ... @@ -171,4 +174,14 @@ function scene6_draw()
171 174 end
172 175 love.graphics.setColor(255, 255, 255)
173 176 end
  177 +
  178 + if ended and starttimer % (5/12) > (5/24) then
  179 + properprint("appuie sur espace pour recommencer", 15, 50, scale/4);
  180 + end
  181 +end
  182 +
  183 +function scene6_keypressed(key, unicode)
  184 + if ended then
  185 + love.event.quit()
  186 + end
174 187 end
... ...