Commit 2e75b9d4cc735fc4d01d24231286ef62378e837d
1 parent
ba814e44
Communication du score
Showing
3 changed files
with
5 additions
and
3 deletions
Show diff stats
game/main.lua
game/menu.lua
game/scene6.lua
... | ... | @@ -107,7 +107,8 @@ 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) | |
110 | + print("SCORE|" .. scoretot .. "|" .. pseudo) | |
111 | + socket.http.request("http://" .. arg[2] .. "/addScore?score=" .. scoretot .. "&name=" .. socket.url.escape(pseudo)) | |
111 | 112 | ended = true |
112 | 113 | staralpha = 1 |
113 | 114 | |
... | ... | @@ -122,8 +123,8 @@ function scene6_update(dt) |
122 | 123 | end |
123 | 124 | |
124 | 125 | if starttimer >= 20 and starttimer -dt < 20 then |
125 | - changegamestate("menu") | |
126 | 126 | credits:pause() |
127 | + changegamestate("menu") | |
127 | 128 | end |
128 | 129 | end |
129 | 130 | ... | ... |