var counter : int := 0
var x, y : int := 100
var keys : array char of boolean
View.Set ('offscreenonly')
loop
Input.KeyDown (keys)
if keys ('d') then
x += 1
counter -= 10
elsif keys ('a') then
x -= 1
counter += 10
end if
%counter -= 10
counter mod= 360
%Bottom Legs
drawline (x + round (cosd (counter) * 5), y + 5, x + round (cosd (counter) * 10), max (y + round (sind (counter) * 15) - 10, y - 10), black)
drawline (x + round (cosd (counter + 180) * 5), y + 5, x + round (cosd (counter + 180) * 10), max (y + round (sind (counter + 180) * 15) - 10, y - 10), black)
%Middle Legs
drawline (x + round (cosd (counter)), y + 10, x + round (cosd (counter) * 5), y + 5, black)
drawline (x + round (cosd (counter)), y + 10, x + round (cosd (counter + 180) * 5), y + 5, black)
%Torso
drawline (x + round (cosd (counter)), y + 10, x + round (cosd (counter) * 2), y + 30, black)
%Top Arm
drawline (x + round (cosd (counter)), y + 25, x + round (cosd (counter + 10) * 8), y + 20 + round (sind (counter) * 2), black)
drawline (x + round (cosd (counter)), y + 25, x + round (cosd (counter - 150) * 8), y + 20 + round (sind (counter + 180) * 2), black)
%Bottom Arm
drawline (x + round (cosd (counter) * 10) + 8, y + 20 + round (sind (counter) * 5), x + round (cosd (counter + 10) * 8), y + 20 + round (sind (counter) * 2), black)
drawline (x + round (cosd (counter + 180) * 10) + 8, y + 20 + round (sind (counter + 180) * 5), x + round (cosd (counter - 150) * 8), y + 20 + round (sind (counter + 180) * 2), black)
%Head
drawoval (x + round (cosd (counter) * 2), y + 30 + 8, 8, 8, black)
View.Update
Time.DelaySinceLast (30)
cls
end loop
|