Вот простой пример. Подскажите как в данном случае нагружается система? Этот пример будет работать бесконечно или память переполнится?
Code: Select all
graphics
graphics clear .3,.6,.8
fill color 1,.5,0
fill rect 50,50 to 1024,724
sprite 1 begin 100,100
fill color 0,.5,.6
fill circle 50,50 size 50
sprite 1 end
sprite 1 at 50,50
sprite 1 show
sprite 1 delay .01
sprite 1 dx 5 dy 0
sprite 1 loop
loop:
if m=0 and sprite_hit ("1",1000,50)=1 then goto 10
if m=1 and sprite_hit ("1",934,50)=1 then goto 20
if m=2 and sprite_hit ("1",934,724)=1 then goto 30
if m=3 and sprite_hit ("1",950,669)=1 then goto 40
if m=4 and sprite_hit ("1",0,669)=1 then goto 50
if m=5 and sprite_hit ("1",80,669)=1 then goto 60
if m=6 and sprite_hit ("1",80,0)=1 then goto 70
if m=7 and sprite_hit ("1",50,95)=1 then ! sprite 1 dx 5 dy 0 ! m=0 ! endif
goto loop
10 m=1
graphics clear .3,.6,.8
fill color 1,.5,0
fill rect -50,50 to 978,724
sprite 1 at 50,50
goto loop
20 m=2
sprite 1 dx 0 dy 5
goto loop
30 m=3
graphics clear .3,.6,.8
fill color 1,.5,0
fill rect -50,0 to 978,674
sprite 1 at 879,0
goto loop
40 m=4
sprite 1 dx -5 dy 0
goto loop
50 m=5
graphics clear .3,.6,.8
fill color 1,.5,0
fill rect 50,0 to 1024,674
sprite 1 at 900,574
goto loop
60 m=6
sprite 1 dx 0 dy -5
goto loop
70 m=7
graphics clear .3,.6,.8
fill color 1,.5,0
fill rect 50,50 to 1024,724
sprite 1 at 50,600
goto loop