bulletn := 0
loop
exit when bulletn >= numberb
Draw.FillOval (xbullet (bulletn), ybullet (bulletn), 5, 5, 7)
ybullet (bulletn) := ybullet (bulletn) + 10
bulletn := bulletn + 1
end loop
y2 := y2 - y3
y4 := y4 - y3
%------------------------------------------------
Draw.FillBox (0, 0, 400, 600, green)
Draw.FillBox (xl, yl, xr, yt, sc)
Draw.FillBox (95, 0, 105, 600, white)
Draw.FillBox (195, 0, 205, 600, white)
Draw.FillBox (295, 0, 305, 600, white)
Draw.FillOval (xrock, yrock, 4, 4, darkgrey)
Draw.FillOval (xrock - 1, yrock + 2, 5, 5, darkgrey)
Draw.FillOval (xrock + 3, yrock + 3, 4, 4, darkgrey)
Draw.FillOval (xrock2, yrock2, 4, 4, darkgrey)
Draw.FillOval (xrock2 - 1, yrock2 + 2, 5, 5, darkgrey)
Draw.FillOval (xrock2 + 3, yrock2 + 3, 4, 4, darkgrey)
Draw.FillBox (10, 60, 390, 65, red)
%------------------------------------------------
Draw.FillOval (xcar + 9, 77, 5, 3, yellow) %left light
Draw.Oval (xcar + 9, 77, 5, 3, grey) %left light shading
Draw.FillOval (xcar + 31, 77, 5, 3, yellow) %right light
Draw.Oval (xcar + 31, 77, 5, 3, grey) %right light shading
Draw.FillOval (xcar + 20, 69, 21, 10, 17) %front bumper
Draw.FillOval (xcar + 20, 21, 21, 10, 17) %rear bumper
Draw.FillBox (xcar, 20, xcar + 40, 70, 16) %car hood
Draw.FillBox (xcar + 15, 30, xcar + 25, 60, grey) %gun part 1
Draw.FillBox (xcar + 18, 60, xcar + 22, 65, grey) %gun part 2
Draw.FillBox (xcar + 19, 65, xcar + 21, 67, grey) %gun part 3
Draw.Box (xcar + 15, 30, xcar + 25, 60, 18) %gun part 1 shading
%--------------------------------------------------
Draw.FillOval (x2 + 9, y2 - 4, 5, 3, yellow) %Left light
Draw.Oval (x2 + 9, y2 - 4, 5, 3, grey) %Left light shading
Draw.FillOval (x2 + 31, y2 - 4, 5, 3, yellow) %Right light
Draw.Oval (x2 + 31, y2 - 4, 5, 3, grey) %Right light shading
Draw.FillOval (x2 + 20, y2 + 50, 20, 5, 112) %Rear bumper
Draw.FillOval (x2 + 20, y2, 20, 5, 112) %Front bumper
Draw.FillBox (x2, y2, x2 + 40, y2 + 50, red) %Hood
Draw.FillBox (x2 + 5, y2 + 5, x2 + 35, y2 + 45, brightred) %Bomb part 1
Draw.Line (x2 + 15, y2 + 5, x2 + 15, y2 + 45, black) %Bomb line 1
Draw.Line (x2 + 25, y2 + 5, x2 + 25, y2 + 45, black) %Bomb line 2
Draw.FillOval (x2 + 20, y2 + 25, 10, 10, grey) %Bomb clock
Draw.Line (x2 + 20, y2 + 25, x2 + 25, y2 + 25, black) %Bomb hour hand
Draw.Line (x2 + 20, y2 + 25, x2 + 20, y2 + 35, black) %Bomb minute hand
%--------------------------------------------------
Draw.FillOval (x4 + 9, y4 - 4, 5, 3, yellow) %Second Left light
Draw.Oval (x4 + 9, y4 - 4, 5, 3, grey) %Second Left light shading
Draw.FillOval (x4 + 31, y4 - 4, 5, 3, yellow) %Second Right light
Draw.Oval (x4 + 31, y4 - 4, 5, 3, grey) %Second Right light shading
Draw.FillOval (x4 + 20, y4 + 50, 20, 5, 112) %Second Rear bumper
Draw.FillOval (x4 + 20, y4, 20, 5, 112) %Second Front bumper
Draw.FillBox (x4, y4, x4 + 40, y4 + 50, red) %Second Hood
Draw.FillBox (x4 + 5, y4 + 5, x4 + 35, y4 + 45, brightred) %Second Bomb part 1
Draw.Line (x4 + 15, y4 + 5, x4 + 15, y4 + 45, black) %Second Bomb line 1
Draw.Line (x4 + 25, y4 + 5, x4 + 25, y4 + 45, black) %Second Bomb line 2
Draw.FillOval (x4 + 20, y4 + 25, 10, 10, grey) %Second Bomb clock
Draw.Line (x4 + 20, y4 + 25, x4 + 25, y4 + 25, black) %Second Bomb hour hand
Draw.Line (x4 + 20, y4 + 25, x4 + 20, y4 + 35, black) %Second Bomb minute hand
%------------------------------------------------
Font.Draw ("" + intstr (speed3) + " km/h", 20, 585, font1, black)
Font.Draw ("Score: " + intstr (count2), 215, 585, font1, black)
Font.Draw ("Time: " + intstr (time2), 115, 585, font1, black)
if musicplay = true then
Font.Draw ("Music: ON", 310, 585, font1, black)
elsif musicplay = false then
Font.Draw ("Music: OFF", 310, 585, font1, black)
end if
View.Update ()
%------------------------------------------------
for i : 1 .. numberb
if (ybullet (i) >= y2) and (x2 < xbullet (i)) and (x2 + 40 > xbullet (i)) then <------Right here
randcar := Rand.Int (1, 12)
count5 := count5 + 3
for j : 1 .. 15
Draw.FillBox (0, 0, 400, 600, green)
Draw.FillBox (xl, yl, xr, yt, sc)
Draw.FillBox (95, 0, 105, 600, white)
Draw.FillBox (195, 0, 205, 600, white)
Draw.FillBox (295, 0, 305, 600, white)
Draw.FillOval (xrock, yrock, 4, 4, darkgrey)
Draw.FillOval (xrock - 1, yrock + 2, 5, 5, darkgrey)
Draw.FillOval (xrock + 3, yrock + 3, 4, 4, darkgrey)
Draw.FillOval (xrock2, yrock2, 4, 4, darkgrey)
Draw.FillOval (xrock2 - 1, yrock2 + 2, 5, 5, darkgrey)
Draw.FillOval (xrock2 + 3, yrock2 + 3, 4, 4, darkgrey)
Draw.FillBox (10, 60, 390, 65, red)
%---------------------------------------------------------
Draw.FillOval (xcar + 9, 77, 5, 3, yellow) %left light
Draw.Oval (xcar + 9, 77, 5, 3, grey) %left light shading
Draw.FillOval (xcar + 31, 77, 5, 3, yellow) %right light
Draw.Oval (xcar + 31, 77, 5, 3, grey) %right light shading
Draw.FillOval (xcar + 20, 69, 21, 10, 17) %front bumper
Draw.FillOval (xcar + 20, 21, 21, 10, 17) %rear bumper
Draw.FillBox (xcar, 20, xcar + 40, 70, 16) %car hood
Draw.FillBox (xcar + 15, 30, xcar + 25, 60, grey) %gun part 1
Draw.FillBox (xcar + 18, 60, xcar + 22, 65, grey) %gun part 2
Draw.FillBox (xcar + 19, 65, xcar + 21, 67, grey) %gun part 3
Draw.Box (xcar + 15, 30, xcar + 25, 60, 18) %gun part 1 shading
%--------------------------------------------------------
Draw.FillOval (x4 + 9, y4 - 4, 5, 3, yellow) %Second Left light
Draw.Oval (x4 + 9, y4 - 4, 5, 3, grey) %Second Left light shading
Draw.FillOval (x4 + 31, y4 - 4, 5, 3, yellow) %Second Right light
Draw.Oval (x4 + 31, y4 - 4, 5, 3, grey) %Second Right light shading
Draw.FillOval (x4 + 20, y4 + 50, 20, 5, 112) %Second Rear bumper
Draw.FillOval (x4 + 20, y4, 20, 5, 112) %Second Front bumper
Draw.FillBox (x4, y4, x4 + 40, y4 + 50, red) %Second Hood
Draw.FillBox (x4 + 5, y4 + 5, x4 + 35, y4 + 45, brightred) %Second Bomb part 1
Draw.Line (x4 + 15, y4 + 5, x4 + 15, y4 + 45, black) %Second Bomb line 1
Draw.Line (x4 + 25, y4 + 5, x4 + 25, y4 + 45, black) %Second Bomb line 2
Draw.FillOval (x4 + 20, y4 + 25, 10, 10, grey) %Second Bomb clock
Draw.Line (x4 + 20, y4 + 25, x4 + 25, y4 + 25, black) %Second Bomb hour hand
Draw.Line (x4 + 20, y4 + 25, x4 + 20, y4 + 35, black) %Second Bomb minute hand
%---------------------------------------------------------
Font.Draw ("" + intstr (speed3) + " km/h", 20, 585, font1, black)
Font.Draw ("Score: " + intstr (count2), 215, 585, font1, black)
Font.Draw ("Time: " + intstr (time2), 115, 585, font1, black)
if musicplay = true then
Font.Draw ("Music: ON", 310, 585, font1, black)
elsif musicplay = false then
Font.Draw ("Music: OFF", 310, 585, font1, black)
end if
%---------------------------------------------------------
Draw.FillOval (x2 + 20, y2 + 35, j + 50, j + 50, yellow)
Draw.FillOval (x2 + 20, y2 + 35, j + 35, j + 35, 43)
Draw.FillOval (x2 + 20, y2 + 35, j + 10, j + 10, red)
View.Update ()
delay (9)
y4 := (y4 - y3) + 1
yrock := (yrock - (y3 div 2)) + 1
yrock2 := (yrock2 - (y3 div 2)) + 1
end for
if randcar = 1 or randcar = 5 or randcar = 9 then
x2 := 30
elsif randcar = 2 or randcar = 6 or randcar = 10 then
x2 := 130
elsif randcar = 3 or randcar = 7 or randcar = 11 then
x2 := 230
elsif randcar = 4 or randcar = 8 or randcar = 12 then
x2 := 330
end if
y2 := 620
xbullet (bulletn) := -50
count := count + 1
count2 := count2 + 1
count5 := count5 + 3
end if
if (ybullet (i) >= y4) and (x4 < xbullet (i)) and (x4 + 40 > xbullet (i)) then
randcar := Rand.Int (1, 12)
count5 := count5 + 3
for j : 1 .. 15
Draw.FillBox (0, 0, 400, 600, green)
Draw.FillBox (xl, yl, xr, yt, sc)
Draw.FillBox (95, 0, 105, 600, white)
Draw.FillBox (195, 0, 205, 600, white)
Draw.FillBox (295, 0, 305, 600, white)
Draw.FillOval (xrock, yrock, 4, 4, darkgrey)
Draw.FillOval (xrock - 1, yrock + 2, 5, 5, darkgrey)
Draw.FillOval (xrock + 3, yrock + 3, 4, 4, darkgrey)
Draw.FillOval (xrock2, yrock2, 4, 4, darkgrey)
Draw.FillOval (xrock2 - 1, yrock2 + 2, 5, 5, darkgrey)
Draw.FillOval (xrock2 + 3, yrock2 + 3, 4, 4, darkgrey)
Draw.FillBox (10, 60, 390, 65, red)
%---------------------------------------------------------
Draw.FillOval (xcar + 9, 77, 5, 3, yellow) %left light
Draw.Oval (xcar + 9, 77, 5, 3, grey) %left light shading
Draw.FillOval (xcar + 31, 77, 5, 3, yellow) %right light
Draw.Oval (xcar + 31, 77, 5, 3, grey) %right light shading
Draw.FillOval (xcar + 20, 69, 21, 10, 17) %front bumper
Draw.FillOval (xcar + 20, 21, 21, 10, 17) %rear bumper
Draw.FillBox (xcar, 20, xcar + 40, 70, 16) %car hood
Draw.FillBox (xcar + 15, 30, xcar + 25, 60, grey) %gun part 1
Draw.FillBox (xcar + 18, 60, xcar + 22, 65, grey) %gun part 2
Draw.FillBox (xcar + 19, 65, xcar + 21, 67, grey) %gun part 3
Draw.Box (xcar + 15, 30, xcar + 25, 60, 18) %gun part 1 shading
%---------------------------------------------------------
Draw.FillOval (x2 + 9, y2 - 4, 5, 3, yellow) %Left light
Draw.Oval (x2 + 9, y2 - 4, 5, 3, grey) %Left light shading
Draw.FillOval (x2 + 31, y2 - 4, 5, 3, yellow) %Right light
Draw.Oval (x2 + 31, y2 - 4, 5, 3, grey) %Right light shading
Draw.FillOval (x2 + 20, y2 + 50, 20, 5, 112) %Rear bumper
Draw.FillOval (x2 + 20, y2, 20, 5, 112) %Front bumper
Draw.FillBox (x2, y2, x2 + 40, y2 + 50, red) %Hood
Draw.FillBox (x2 + 5, y2 + 5, x2 + 35, y2 + 45, brightred) %Bomb part 1
Draw.Line (x2 + 15, y2 + 5, x2 + 15, y2 + 45, black) %Bomb line 1
Draw.Line (x2 + 25, y2 + 5, x2 + 25, y2 + 45, black) %Bomb line 2
Draw.FillOval (x2 + 20, y2 + 25, 10, 10, grey) %Bomb clock
Draw.Line (x2 + 20, y2 + 25, x2 + 25, y2 + 25, black) %Bomb hour hand
Draw.Line (x2 + 20, y2 + 25, x2 + 20, y2 + 35, black) %Bomb minute hand
%---------------------------------------------------------
Font.Draw ("" + intstr (speed3) + " km/h", 20, 585, font1, black)
Font.Draw ("Score: " + intstr (count2), 215, 585, font1, black)
Font.Draw ("Time: " + intstr (time2), 115, 585, font1, black)
if musicplay = true then
Font.Draw ("Music: ON", 310, 585, font1, black)
elsif musicplay = false then
Font.Draw ("Music: OFF", 310, 585, font1, black)
end if
%---------------------------------------------------------
Draw.FillOval (x4 + 20, y4 + 35, j + 50, j + 50, yellow)
Draw.FillOval (x4 + 20, y4 + 35, j + 35, j + 35, 43)
Draw.FillOval (x4 + 20, y4 + 35, j + 10, j + 10, red)
View.Update ()
delay (9)
y2 := (y2 - y3) + 1
yrock := (yrock - (y3 div 2)) + 1
yrock2 := (yrock2 - (y3 div 2)) + 1
end for
if randcar = 1 or randcar = 5 or randcar = 9 then
x4 := 30
elsif randcar = 2 or randcar = 6 or randcar = 10 then
x4 := 130
elsif randcar = 3 or randcar = 7 or randcar = 11 then
x4 := 230
elsif randcar = 4 or randcar = 8 or randcar = 12 then
x4 := 330
end if
y4 := 620
xbullet (bulletn) := -50
count := count + 1
count2 := count2 + 1
count5 := count5 + 3
end if
end for
|