Skip to content

Commit

Permalink
Show player nick on victory screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightwolf-47 committed May 7, 2022
1 parent 3bdd53e commit a9d4ef5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion states/game/gamelogic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,12 @@ function logic.drawVictoryWin(timestr) --Draw victory window and make background
love.graphics.rectangle("fill",msgx,msgy,256,128)
love.graphics.setColor(0,0,0,1)
love.graphics.rectangle("line",msgx,msgy,256,128)
local str = colornames[logic.playerwon].." has won!\nTime: "..timestr.."\nClick to continue..."
local str = ""
if _NAOnline then
str = net.players[logic.playerwon][2].." has won!\nTime: "..timestr.."\nClick to continue..."
else
str = colornames[logic.playerwon].." has won!\nTime: "..timestr.."\nClick to continue..."
end
love.graphics.printf(str,_CAFont16,msgx+8,msgy+50,240,"center")
love.graphics.setColor(1,1,1,1)
love.graphics.printf("Victory!",_CAFont24,msgx+8,msgy+8,240,"center")
Expand Down

0 comments on commit a9d4ef5

Please sign in to comment.