Cirno2022/script/sample/SampleRB02.txt

41 lines
1.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#東方弾幕風[Stage]
#ScriptVersion[3]
#Title["SampleRB02"]
#Text["SampleRB02矩形(長方形)画像の回転・拡大"]
@Initialize
{
TSample();
}
@MainLoop
{
yield;
}
task TSample
{
//画像パス設定
let dir = GetCurrentScriptDirectory();
let path = dir ~ "Effect01.png";
let obj = ObjPrim_Create(OBJ_SPRITE_2D); //2Dスプライトオブジェクト生成
Obj_SetRenderPriorityI(obj, 21); //描画優先度を設定
ObjPrim_SetTexture(obj, path); //テクスチャを設定
ObjSprite2D_SetSourceRect(obj, 44, 54, 71, 105); //描画元設定(44, 54)-(71,105)
ObjSprite2D_SetDestCenter(obj); //頂点を(0, 0)中心に配置
ObjRender_SetAngleZ(obj, 45); //45°回転
ObjRender_SetScaleXYZ(obj, 2, 2, 1); //X,Y方向に2倍に拡大
ObjRender_SetPosition(obj, 100, 150, 0); //(100, 150)に移動
//240フレーム待機
loop(240){yield;}
Obj_Delete(obj); //描画オブジェクト削除
//ステージ終了
CloseStgScene();
}