I need help with a function :
Can somebody change this LUA code into C++ code?
Thanks, credit goes to translator.
Code: Select all
green = Color.new(0,255,0)
blue = Color.new(0,0,255)
red = Color.new(255,0 ,0)
timer = Timer.new(0)
timer:stop()
function Blick()
timer:start()
if timer:time() >= 0 and timer:time() < 200 then
screen:clear(red)
end
if timer:time() >= 200 and timer:time() < 400 then
screen:clear(green)
end
if timer:time() >= 400 and timer:time() < 600 then
screen:clear(blue)
end
if timer:time() >= 600 then
timer:stop()
timer:reset(0)
end
end