setscreen ("graphics:1000;650,offscreenonly")
var font2, numberOfBalloons, balloonX, balloonY, balloon1X, balloon1Y, increase, counter : int
var mouseX, mouseY, mouseB : int
var score : string
counter := 0
font2 := Font.New ("sans serif:18:bold")
%Balloon1 procedure.
balloon1Y := 130
balloon1X := 30
balloonX := 12
balloonY := 30
%Process
process check
loop
for i : 1 .. 2
mousewhere (mouseX, mouseY, mouseB)
if mouseB not= 0 and whatdotcolor (mouseX, mouseY) not= 0 then
drawfilloval (mouseX, mouseY, 50, 50, red)
counter += 5
View.Update
delay (20)
cls
end if
end for
end loop
end check
fork check
procedure balloon1
for rising : 1 .. 1
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
delay (150)
score := intstr (counter, 4, 10)
Font.Draw (score, 20,20, font2, red)
%checks mouse position
View.Update
delay (250)
cls
end for
end balloon1
loop
balloon1
end loop
|