var x, y, button, number, enemies, btn, updown : int
var win, win1 := 0
var winID : int
winID := Window.Open ("position:top;center,graphics:640;480")
randomize
process music %Shoot the enemies
Music.PlayFile ("AFI - Sacrifice Theory.wav") %<Plays a background music
end music
% The level background
process bg1
Pic.ScreenLoad ("level1.bmp", 0, 0, picCopy)
end bg1
procedure enemy1
fork bg1
mousewhere (x, y, button)
Pic.ScreenLoad ("level1enemy1.bmp", 300, 345, picCopy)
if x > 300 and x < 556 and y > 345 and y < 480 and button = 1 then
win := win + 1
win1 := win1 + 1
end if
delay (800)
win := win - 1
win1 := win1 + 1
end enemy1
procedure enemy2
fork bg1 % The level background
mousewhere (x, y, button)
Pic.ScreenLoad ("level1enemy2.bmp", 0, 280, picCopy)
win1 := win1 + 1
if x > 0 and x < 196 and y > 280 and y < 415 and button = 1 then
win := win + 1
win1 := win1 + 1
end if
delay (800)
win := win - 1
win1 := win1 + 1
end enemy2
procedure enemy3
fork bg1 % The background
mousewhere (x, y, button)
Pic.ScreenLoad ("level1enemy3.bmp", 150, 100, picCopy) %The third enemy
win1 := win1 + 1
if x > 150 and x < 346 and y > 100 and y < 235 and button = 1 then
win := win + 1
win1 := win1 + 1
end if
delay (800)
win := win - 1
win1 := win1 + 1
end enemy3
Pic.ScreenLoad ("level1.bmp", 0, 0, picCopy)
Pic.ScreenLoad ("beginbutton.bmp", 220, 205, picCopy)
buttonwait ("down", x, y, btn, updown)
if (220 <= x) and (x <= 420) and
(205 <= y) and (y <= 275) then
Pic.ScreenLoad ("level1.bmp", 0, 0, picCopy)
end if
loop
fork music
randint (enemies, 1, 3)
if enemies = 1 then
enemy1
elsif enemies = 2 then
enemy2
elsif enemies = 3 then
enemy3
end if
end loop
|