2021-09-13 22:11:55 -07:00
|
|
|
(import-macros {: incf} :sample-macros)
|
|
|
|
|
2018-10-17 18:32:39 -07:00
|
|
|
(var counter 0)
|
|
|
|
(var time 0)
|
|
|
|
|
|
|
|
{:draw (fn draw [message]
|
2018-11-30 17:40:07 -08:00
|
|
|
(love.graphics.print (: "This window should close in %0.2f seconds"
|
2019-04-20 18:24:43 -07:00
|
|
|
:format (- 3 time)) 32 16))
|
2018-10-17 18:32:39 -07:00
|
|
|
:update (fn update [dt set-mode]
|
|
|
|
(if (< counter 65535)
|
|
|
|
(set counter (+ counter 1))
|
|
|
|
(set counter 0))
|
2021-09-13 22:11:55 -07:00
|
|
|
(incf time dt)
|
|
|
|
;;(set time (+ time dt))
|
2018-10-17 18:32:39 -07:00
|
|
|
(when (> time 3)
|
|
|
|
(love.event.quit)))
|
|
|
|
:keypressed (fn keypressed [key set-mode]
|
|
|
|
(love.event.quit))}
|