ユニークな変数を定義
uniq () [マクロ]
(プラグイン / モジュール : mod_TimerRepeat)
指定した区間において、名前の被らないユニークな変数として扱えるようになります。
timer_repeat,timer_loopには既にそれぞれuniq_start,uniq_endが組み込まれています。 そのため、timer_repeat〜timer_loop区間ではuniq_start,uniq_endを記述することなくuniq()が使用できます。 uniq2, uniq3, 〜 uniqN 〜, uniq9 と指定するとN個外側のスコープのuniq()を指定することができます。
// // uniq()検証用サンプルスクリプト // #include "mod_uniq.hsp" a=1 : b=2 : c=3 mes "a = "+a,1 : mes "\tb = "+b,1 : mes "\tc = "+c :pos 0 uniq_start uniq(a)=4 : uniq(b)=5 : uniq(c)=6 mes "a = "+uniq(a),1 : mes "\tb = "+uniq(b),1 : mes "\tc = "+uniq(c) :pos 0 uniq_start uniq(a)=7 : uniq(b)=8 : uniq(c)=9 mes "a = "+uniq(a),1 : mes "\tb = "+uniq(b),1 : mes "\tc = "+uniq(c) :pos 0 uniq_end uniq_start uniq(a) = "あ" : uniq(b) = "い" ;: uniq(c) = "う" mes "a = "+uniq(a),1 : mes "\tb = "+uniq(b),1 : mes "\tc = "+uniq(c) :pos 0 ddim uniq(d),4 uniq(d)=1.2, 2.3, 3.4 mes "d = ",1 foreach uniq(d) mes ""+uniq(d)(cnt)+", ",1 loop mes "" :pos 0 uniq_end mes "a = "+uniq(a),1 : mes "\tb = "+uniq(b),1 : mes "\tc = "+uniq(c) :pos 0 uniq_end mes "a = "+a,1 : mes "\tb = "+b,1 : mes "\tc = "+c :pos 0
05.timer_repeatの精度.hsp | #include "../mod_TimerRepeat.hsp" *start t = timer_getT.. |
07.timer_repeat/timer_easeの応用.hsp | #include "../a2d+AlphaLayer.hsp" #include "../mod_Timer.. |
08.uniq()の検証.hsp | #include "../mod_TimerRepeat.hsp" a=1 : b=2 : c=3 color.. |
14.(TimerRepeat_ver2.5)uniq2でひとつ外側を取得.hsp | #include "../mod_TimerRepeat.hsp" randomize font msgoth.. |
EX1.スライドインメニュー【timer_repeat内に別のtimer_repeatを記述】.hsp | #include "../a2d+AlphaLayer.hsp" #include "../mod_Timer.. |
EX2.ADVゲーム画面(だけ)【アルファレイヤーの中に子アルファレイヤーを作る】.hsp | #include "../a2d+AlphaLayer.hsp" #include "../mod_Timer.. |
EX3.(HSP3Dish-TimerRepeat)ブロック崩し【timer_setTimerEngineマニュアル】.hsp | title "ブロック崩し" buffer 1,x2,y2 メニュー薄膜用のバッファ gsel 0 cls 4.. |
EX4.Floppy-Word【アルファレイヤー/タイマーリピート利用ミニゲーム】.hsp | #include "hsptvapp.as" GitHubからモジュールを取得。 #include "../a.. |
EX5.スライダーオブジェクト.hsp | #include "../a2d+AlphaLayer.hsp" #include "../mod_Timer.. |
プラグイン / モジュール | mod_TimerRepeat |
バージョン | 2.5 |
作成日 | 2024/1/5 |
著作者 | MIZUSHIKI |
URL | http://suwa.pupu.jp/ |
備考 | mod_TimerRepeat.hspをインクルードすること。 |
タイプ | 拡張命令 |
グループ | プログラム制御マクロ |
対応環境 | ・Windows 版 HSP |