dead={} function game_over_init() dead.count=0 dead.pos={} dead.vel={} for i=1,256 do dead.pos[i]=0 dead.vel[i]=(200+math.random(0,399))/400 end -- game_update=dead.update music.play(audio_game_over,0) states:next() end function game_over_update() dead.count=dead.count+1 for i=1,256 do if dead.pos[i]<192 then dead.pos[i]=dead.pos[i]+dead.vel[i] draw.vline(i-1,0,dead.pos[i],16) end end if dead.count>50 then if dead.count>130 then draw.text("GAME OVER",96,90,2) elseif dead.count>120 then draw.text("GAME OVE",96,90,2) elseif dead.count>110 then draw.text("GAME OV",96,90,2) elseif dead.count>100 then draw.text("GAME O",96,90,2) elseif dead.count>90 then draw.text("GAME",96,90,2) elseif dead.count>90 then draw.text("GAM",96,90,2) elseif dead.count>70 then draw.text("GA",96,90,2) elseif dead.count>60 then draw.text("G",96,90,2) end end if (dead.count>250 and (key.press(keyShoot) or pad.press(btnShoot))) or dead.count>500 then -- game_exit() -- game_init(true) states:next() end end function game_over_end() states:executar("title",false) end states:registrar("game over",{game_over_init, game_over_update, game_over_end})