Better error handling
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
local lastMessage = 0
|
||||
|
||||
function love.draw2()
|
||||
love.graphics.setBackgroundColor(0, 1, 0)
|
||||
love.graphics.setBackgroundColor(0, 0, 0)
|
||||
|
||||
local time
|
||||
if lastMessage == 0 then
|
||||
time = "Never"
|
||||
else
|
||||
time = love.timer.getTime() - time "s ago"
|
||||
end
|
||||
love.graphics.print("Last message received: " .. time, 5, 5)
|
||||
end
|
||||
|
||||
function love.load()
|
||||
love.graphics.setFont(love.graphics.newFont(15))
|
||||
love.window.setFullscreen(true)
|
||||
end
|
||||
|
||||
function love.gamepadpressed(joystick, button)
|
||||
print("Pressed gamepad button " .. button .. " on joystick " .. joystick:getName())
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user