dead={}

function dead.start()
    dead.count=0
    dead.pos={}
    dead.vel={}
    for i=1,128 do
        dead.pos[i]=0
        dead.vel[i]=(200+math.random(0,399))/400
    end
    game_update=dead.update
end

function dead.update()
    dead.count=dead.count+1
    for i=1,128 do
        if dead.pos[i]<96 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",44,40,2)
        elseif dead.count>120 then
            draw.text("GAME OVE",44,40,2)
        elseif dead.count>110 then
            draw.text("GAME OV",44,40,2)
        elseif dead.count>100 then
            draw.text("GAME O",44,40,2)
        elseif dead.count>90 then
            draw.text("GAME",44,40,2)
        elseif dead.count>80 then
            draw.text("GAM",44,40,2)
        elseif dead.count>70 then
            draw.text("GA",44,40,2)
        elseif dead.count>60 then
            draw.text("G",44,40,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)
    end
end