¤Í¤³¤µ¤ó¤È£ë¤Î»ú¤µ¤ó¤Î¥½¡¼¥¹¤òÁȤ߹ç¤ï¤»¤ë¤È¡¢¤È¤ê¤¢¤¨¤º°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
mx=400:my=300 ; ¥×¥ì¥¤¥ä¡¼¤ÎºÂɸ
wx=ginfo_winx
wy=ginfo_winy
msp=4 ;¥×¥ì¥¤¥ä¡¼¤Î°ÜÆ°¥¹¥Ô¡¼¥É
mse=1 ;Ũ¤Î°ÜÆ°¥¹¥Ô¡¼¥É
;120ÉôÖ
countermax=120*60
counter=1
repeat
;¼«µ¡°ÜÆ°
stick key,15 ; ¥¡¼ÆþÎÏ
if key&1 : mx=limit( mx-msp, 0, wx ) ; º¸°ÜÆ°
if key&4 : mx=limit( mx+msp, 0, wx ) ; ±¦°ÜÆ°
if key&2 : my=limit( my-msp, 0, wy ) ; ¾å°ÜÆ°
if key&8 : my=limit( my+msp, 0, wy ) ; ²¼°ÜÆ°
;Ũµ¡°ÜÆ°
tmse=mse
if x<mx:x+tmse ;¥×¥ì¥¤¥ä¡¼¤òÄÉÈø
if x>mx:x-tmse
if y<my:y+tmse
if y>my:y-tmse
;ÉÁ¼Ì½èÍý
redraw 0
color 0,0,0:boxf
color 0,255,255
pos 0,0:mes "TIME:"+(counter/60)
;Ũµ¡ÉÁ¼Ì
pos x,y:mes "¡»"
;¼«µ¡ÉÁ¼Ì
pos mx,my:mes "¡ü"
redraw 1
await 16
if countermax<=counter{
break
}
counter++ ;¥«¥¦¥ó¥¿¡¼¤ÎÃͤò¾ï¤ËÁý¤ä¤¹
loop
¤³¤ì¤Ë¡¤È¢¤òÄɲ乤ë¤ï¤±¤Ç¤¹¤¬¡Ä
¤Þ¤º¡¤Ï¡¢¿ô³Ø¤Î¡Ø»°Ê¿Êý¤ÎÄêÍý¡Ù¤òÍѤ¤¤ë¤³¤È¤Ç¼Â¸½¤Ç¤¤Þ¤¹¡£
¼«µ¡¤ÈŨ¤È¤Îµ÷Î¥¤ò·×»»¤·¡¢¤½¤Îµ÷Î¥¤¬°ìÄê̤Ëþ¤«¤É¤¦¤«¤òȽÄꤹ¤ë¤³¤È¤Ç¡¢ÀÜ¿¨¤·¤¿¤«¤É¤¦¤«¤òȽÃǤǤ¤Þ¤¹¡£
HSP¤Ë¤Ï¡Øsqrt¡Ù¤È¤¤¤¦Ê¿Êýº¬¤òµá¤á¤ë´Ø¿ô¤¬¤¢¤ë¤Î¤Ç¡¢¤½¤ì¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¼¡¤Ë¢¤Ç¤¹¤¬¡¢¤É¤Î¤¯¤é¤¤¤Î»þ´Ö¤¬·Ð²á¤·¤¿¤«¤Ï¡Øawait¡Ù¤ÈcounterÊÑ¿ô¤òÍѤ¤¤Æ·×»»¤·¤Þ¤¹¡£
await¤Ë»ØÄꤹ¤ë°ú¿ô¤Ï¥ß¥êÉäǡ¢1000¤ò»ØÄꤹ¤ë¤È°ìÉÃÂÔµ¡¤·¤Þ¤¹¡£
1000¤ò60¤Ç³ä¤ë¤È16.6666¡Ä¤ÇÂçÂÎ16¤Ê¤Î¤Ç¡¢¡Øawait 16¡Ù¤Ç¥ë¡¼¥×¤´¤È¤Ëcounter¤ò1¤º¤Ä¤·¤Æ¤¤¤±¤Ð¡¢counter¤¬60¤Ë¤Ê¤ë¤³¤í¤Ë¤Ï°ìÉ÷вᤷ¤¿¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
Ũ¤ÎÆ°¤¤¬Á᤯¤Ê¤ë¤Î¤Ï¡¢³«»Ï¤«¤é20¡Á25Éá¢40¡Á45Éá¢60¡Á65ÉáĤȤ¤¤¦¤³¤È¤Ê¤Î¤Ç
¸½ºß¤Îcounter¤ò60¤Ç³ä¤Ã¤Æ·Ð²á»þ´Ö¡ÊÉáˤòµá¤á¡¢¤½¤ì¤ò¤µ¤é¤Ë20¤Ç³ä¤Ã¤Æ¾ê;¤òµá¤á¤ì¤Ð¡¢
¤½¤ÎÃͤ¬¡Ø0°Ê¾å5̤Ëþ¤«¤É¤¦¤«¡Ù¤È¤¤¤¦È½Äê¤ò¹Ô¤¨¤Æ¡¢È½Ä꤬¿¿¤À¤Ã¤¿¤é¡ØŨ¤Î¥¹¥Ô¡¼¥É¤ò¾å¤²¤ë¡Ù¤È¤¤¤¦½èÍý¤ò¹Ô¤¦¤³¤È¤¬½ÐÍè¤Þ¤¹¡£
¤³¤ó¤Ê¤È¤³¤í¤Ç¤·¤ç¤¦¤«¡¢À§Èó¼ÂÁõ¤ò´èÄ¥¤Ã¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£