setscreen ("graphics:1000;650,offscreenonly")
var numberOfBalloons, balloonX, balloonY, balloon1X, balloon1Y, score,increase : int
%Balloon1 procedure.
balloon1Y := 130
balloon1X := 30
balloonX := 12
balloonY := 30
score := 0
var mouseX, mouseY, mouseB : int
procedure increaseScore
score := score+1
end increaseScore
procedure balloon1
for rising : 1 .. 5
randint (balloonX, 1, maxx)
randint (increase, 5, 40)
drawfilloval (balloon1X, balloon1Y, 50, 50, blue)
drawline (balloon1X, balloon1Y - 50, balloon1X, balloon1Y - 150, black)
if balloon1Y > maxy then
balloon1Y := 25
end if
balloon1Y := balloon1Y + 50
randint (balloon1X, 1, maxx)
%Second balloon
randint (balloonX, 50, 500)
randint (increase, 5, 40)
drawfilloval (balloonX, balloonY, 50, 50, 3)
drawline (balloonX, balloonY - 50, balloonX, balloonY - 150, black)
if balloonY > maxy then
balloonY := 15
end if
balloonY := balloonY + increase
View.Update
delay (1500)
cls
%Checks if hit or miss
if mouseB not= 0 and whatdotcolor (mouseX, mouseY) not=0 then
drawfillbox (0,0,maxx,maxy, black)
delay (100)
View.Update
increaseScore
end if
end for
end balloon1
loop
mousewhere (mouseX, mouseY, mouseB)
put mouseX, mouseY, mouseX, mouseB
delay (100)
balloon1
put score
exit when score>5
end loop
|