1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-12-14 20:20:29 +00:00

Update tron

This commit is contained in:
LDDestroier 2018-11-14 19:48:05 -05:00 committed by GitHub
parent 50333e7580
commit f78bb05634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
tron
View File

@ -540,7 +540,7 @@ end
local titleScreen = function() local titleScreen = function()
term.clear() term.clear()
drawImage(images.logo, scr_x / 2 - images.logo.x / 2, 3) drawImage(images.logo, math.ceil(scr_x / 2 - images.logo.x / 2), 3)
local choice = makeMenu(2, scr_y - 4, { local choice = makeMenu(2, scr_y - 4, {
"Start Game", "Start Game",
@ -644,19 +644,19 @@ local deadAnimation = function(doSend)
if deadGuys[you] and deadGuys[nou] then if deadGuys[you] and deadGuys[nou] then
scrollToPosition(player[nou].x, player[nou].y) scrollToPosition(player[nou].x, player[nou].y)
scrollToPosition(player[you].x, player[you].y) scrollToPosition(player[you].x, player[you].y)
drawImage(images.tie, math.floor(scr_x / 2 - images.tie.x / 2), math.floor(scr_y / 2 - images.tie.y / 2)) drawImage(images.tie, math.ceil(scr_x / 2 - images.tie.x / 2), math.floor(scr_y / 2 - images.tie.y / 2))
waitForKey(1) waitForKey(1)
return "end" return "end"
else else
if deadGuys[you] then if deadGuys[you] then
scrollX, scrollY = player[nou].x - scr_x / 2, player[nou].y - scr_y / 2 scrollX, scrollY = player[nou].x - scr_x / 2, player[nou].y - scr_y / 2
scrollToPosition(player[you].x, player[you].y) scrollToPosition(player[you].x, player[you].y)
drawImage(images.lose, math.floor(scr_x / 2 - images.lose.x / 2), math.floor(scr_y / 2 - images.lose.y / 2)) drawImage(images.lose, math.ceil(scr_x / 2 - images.lose.x / 2), math.floor(scr_y / 2 - images.lose.y / 2))
waitForKey(1) waitForKey(1)
return "end" return "end"
elseif deadGuys[nou] then elseif deadGuys[nou] then
scrollToPosition(player[nou].x, player[nou].y) scrollToPosition(player[nou].x, player[nou].y)
drawImage(images.win, math.floor(scr_x / 2 - images.win.x / 2), math.floor(scr_y / 2 - images.win.y / 2)) drawImage(images.win, math.ceil(scr_x / 2 - images.win.x / 2), math.floor(scr_y / 2 - images.win.y / 2))
waitForKey(1) waitForKey(1)
return "end" return "end"
end end