Commit 35820c9dfe698c2956db8ddfc936efe9291b3b38
1 parent
cd9681f5
Paré pour distribution
Showing
3 changed files
with
12 additions
and
37 deletions
Show diff stats
game/main.lua
game/menu.lua
... | ... | @@ -74,7 +74,6 @@ function menu_load() |
74 | 74 | |
75 | 75 | bgmusic = love.audio.newSource("audio/trosong.ogg") |
76 | 76 | bgmusic:setLooping(true) |
77 | - bgmusic:setVolume(0) | |
78 | 77 | lasersound = love.audio.newSource("audio/laser.wav") |
79 | 78 | bigexplosionsound = love.audio.newSource("audio/bigexplosion.ogg") |
80 | 79 | explosionsound = love.audio.newSource("audio/explosion.wav") |
... | ... | @@ -87,7 +86,6 @@ function menu_load() |
87 | 86 | credits = love.audio.newSource("audio/credits.ogg") |
88 | 87 | approach = love.audio.newSource("audio/approach.ogg") |
89 | 88 | credits:setLooping(true) |
90 | - credits:setVolume(0) | |
91 | 89 | |
92 | 90 | skipupdate = true |
93 | 91 | shakeamount = 0 |
... | ... | @@ -114,8 +112,6 @@ function menu_load() |
114 | 112 | reallaserdelay = 0.4 |
115 | 113 | starttimer = 0 |
116 | 114 | |
117 | - pseudo = "" | |
118 | - | |
119 | 115 | rockets = nil |
120 | 116 | jumped = nil |
121 | 117 | landing = nil |
... | ... | @@ -142,7 +138,7 @@ function menu_load() |
142 | 138 | playerx = 10 |
143 | 139 | -- 1 2 3 4 5 6 7 |
144 | 140 | startactions = {2.3, 4.6, 7, 8.20, 9.20, 10.20, 11.20} |
145 | - starti = -1 | |
141 | + starti = 0 | |
146 | 142 | |
147 | 143 | end |
148 | 144 | |
... | ... | @@ -221,14 +217,9 @@ function menu_draw() |
221 | 217 | draw(titleimg, 50, 23, math.sin(sini)/10, (math.sin(sini2)+1)/5+0.7, (math.sin(sini2)+1)/5+0.7, 50, 13) |
222 | 218 | |
223 | 219 | love.graphics.setColor(255, 0, 0) |
224 | - if starti >= -1 then | |
225 | - properprint("tape ton pseudo", 18, 40+textpos[0], scale/2) | |
226 | - properprint(pseudo, 20, 50+textpos[0], scale/2) | |
227 | - end | |
228 | - | |
229 | - -- if starti >= 0 then | |
230 | - -- properprint("directed by maurice", 13, 40+textpos[0], scale/2) | |
231 | - -- end | |
220 | + if starti >= 0 then | |
221 | + properprint("directed by maurice", 13, 40+textpos[0], scale/2) | |
222 | + end | |
232 | 223 | if starti >= 1 then |
233 | 224 | properprint("utilise les fleches", 11, 40+textpos[1], scale/2) |
234 | 225 | end |
... | ... | @@ -254,22 +245,3 @@ function menu_draw() |
254 | 245 | love.graphics.setColor(255, 255, 255) |
255 | 246 | end |
256 | 247 | |
257 | -function menu_keypressed(key, unicode) | |
258 | - if starti == -1 then | |
259 | - if string.len(pseudo) < 16 then | |
260 | - if string.sub(key, 1, 2) == 'kp' then | |
261 | - key = string.sub(key, 3, 3) | |
262 | - end | |
263 | - if string.len(key) == 1 and string.find(fontglyphs, key, 1, true) then | |
264 | - pseudo = pseudo .. key | |
265 | - end | |
266 | - end | |
267 | - if key == 'backspace' then | |
268 | - pseudo = string.sub(pseudo, 1, -2) | |
269 | - end | |
270 | - if key == 'return' and string.len(pseudo) > 3 then | |
271 | - starttimer = startactions[1] | |
272 | - starti = 1 | |
273 | - end | |
274 | - end | |
275 | -end | ... | ... |
game/scene6.lua
... | ... | @@ -107,8 +107,6 @@ function scene6_update(dt) |
107 | 107 | end |
108 | 108 | |
109 | 109 | if starttimer >= 15.7 and starttimer -dt < 15.7 then |
110 | - print("SCORE|" .. scoretot .. "|" .. pseudo) | |
111 | - socket.http.request("http://" .. arg[2] .. "/addScore?score=" .. scoretot .. "&name=" .. socket.url.escape(pseudo)) | |
112 | 110 | ended = true |
113 | 111 | staralpha = 1 |
114 | 112 | |
... | ... | @@ -122,7 +120,10 @@ function scene6_update(dt) |
122 | 120 | v:update(dt) |
123 | 121 | end |
124 | 122 | |
125 | - if starttimer >= 20 and starttimer -dt < 20 then | |
123 | +end | |
124 | + | |
125 | +function scene6_keypressed(key, unicode) | |
126 | + if ended then | |
126 | 127 | credits:pause() |
127 | 128 | changegamestate("menu") |
128 | 129 | end |
... | ... | @@ -182,4 +183,8 @@ function scene6_draw() |
182 | 183 | love.graphics.setColor(255, 255, 255) |
183 | 184 | end |
184 | 185 | |
186 | + if ended and starttimer % (5/12) > (5/24) then | |
187 | + properprint("appuie sur espace pour recommencer", 15, 50, scale/4) | |
188 | + end | |
189 | + | |
185 | 190 | end | ... | ... |