| View previous topic :: View next topic |
| Author |
Message |
Question_dev
Joined: 24 Aug 2007 Posts: 88
|
Posted: Wed Aug 29, 2007 3:50 am Post subject: Function help ! |
|
|
Hi ,
I need help with a function :
Can somebody change this LUA code into C++ code?
Thanks, credit goes to translator.
| Code: | 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 |
|
|
| Back to top |
|
 |
|Coolj|
Joined: 27 Aug 2007 Posts: 3
|
Posted: Wed Aug 29, 2007 3:59 am Post subject: |
|
|
| Look at the psp-programming thread XD |
|
| Back to top |
|
 |
Question_dev
Joined: 24 Aug 2007 Posts: 88
|
Posted: Wed Aug 29, 2007 4:02 am Post subject: |
|
|
| i have take a look, but cant find it :( |
|
| Back to top |
|
 |
flatmush
Joined: 07 Aug 2007 Posts: 28 Location: Here
|
|
| Back to top |
|
 |
Question_dev
Joined: 24 Aug 2007 Posts: 88
|
Posted: Wed Aug 29, 2007 4:28 am Post subject: |
|
|
ok, ok....
I will make it self, but how did i code a timer like in the lua script? in c++ |
|
| Back to top |
|
 |
|