setscreen ("graphics:max,max,offscreenonly")
var x : int := 350
var y : int := 225
var bomby : int := y + 50
var picID : int
var chars : array char of boolean
loop
cls
drawfilloval (x - 5, y - 40, 5, 20, 43)
drawfillbox (x - 10, y - 30, x - 20, y - 40, black)
drawfillbox (x, y - 30, x + 10, y - 40, black)
drawfilloval (x - 5, y, 5, 5, black)
drawfillbox (x, y, x - 10, y - 40, black)
picID := Pic.New (x, y, x, y)
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
y += 1
end if
if chars (KEY_DOWN_ARROW) then
y -= 1
end if
if chars (KEY_LEFT_ARROW) then
x -= 1
end if
if chars (KEY_RIGHT_ARROW) then
x += 1
end if
if chars (KEY_CTRL) then
drawfillbox (x - 4, y + 10, x - 6, y + 1000, 43)
end if
%bomb animation
if chars (KEY_ALT) then
for i : 1 .. 800
cls
drawfilloval (x, i, 100, 20, red)
end for
end if
%end bomb animation
Pic.Draw (picID, x, y, picCopy)
Pic.Free (picID)
View.Update
end loop
|