僕はゲームのメインループに次のようなコードを仕込んだものだ。
put the ticks into t
--処理1
add the ticks - t to item 1 of tt
put the ticks into t
--処理2
add the ticks - t to item 2 of tt
put the ticks into t
--処理3
add the ticks - t to item 3 of tt
put tt into msg
PgColorX2.31新機能(予定)
○suite機能(すいーと きのう)
PgColorX "SetSuite",3,1,cd fld "data"
PgColorX "DrawSuite","cd",3
cd fld "data"に書かれたデータを保存して、一発で描画できます。
データは以下のようなもの
「"Paint",,"#ffff00","0,0,64,64"
"CopyBits",1,,"0,0,32,32",rect of cd btn 1
"Cicn",,"cicn1","rect of cd btn 2"」
rect of cd btn 1だと、SetSuiteした時のrectになりますが、
"rect of cd btn 1"のようにすればDrawSuiteした時のrectになります。
これでボタンが移動してもばっちり追従するようにできます。