Search found 2 matches
- Sat Feb 07, 2015 9:45 pm
- Forum: Support and Development
- Topic: Timer/sleep on love2d
- Replies: 3
- Views: 2343
Re: Timer/sleep on love2d
Better example of the problem function love.load() light_on = love.graphics.newImage("light_on.png") light_off = love.graphics.newImage("light_off.png") set = light_off sleep = 0 switch = true end function love.update(dt) if switch then while sleep < 5 do sleep = sleep + dt set =...
- Sat Feb 07, 2015 8:51 pm
- Forum: Support and Development
- Topic: Timer/sleep on love2d
- Replies: 3
- Views: 2343
Timer/sleep on love2d
Trying to make a game but the game freeze when using "love.timer.sleep".
Code: Select all
print("light on")
--need small code to make it stay "light on" for example 5sec.
os.execute("clear")
print("light off")