Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rojo = color.new( 255, 0, 0 )
- azul = color.new( 0, 0, 255)
- size=0.8
- tiempo={}
- crono={tiempo=timer.new(),status="stop"}
- crono.tiempo:reset(); crono.tiempo:stop();
- while true do
- controls.read()
- for i = 1, #tiempo do
- screen.print(200,50+(i-1)*15,i..": "..tiempo[i],size,rojo,0x0)
- end
- if controls.press("cross") then
- if crono.tiempo:time() == 0 then
- crono.tiempo:start()
- elseif crono.tiempo:time() > 0 then
- table.insert(tiempo,crono.tiempo:time()/1000)
- end
- end
- if controls.r() and controls.l() then
- tiempo={}
- end
- screen.print(200,20,crono.tiempo:time()/1000,size,azul,0x0)
- if controls.select() then a() end
- screen.flip()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement