NarumiSTG_HyperSnowDrifter/script/sample/SampleRB03.txt

56 lines
3.0 KiB
Plaintext
Raw 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["SampleRB03"]
#Text["SampleRB03複数の矩形画像の描画"]
@Initialize
{
TSample();
}
@MainLoop
{
yield;
}
task TSample
{
//画像パス設定
let dir = GetCurrentScriptDirectory();
let path = dir ~ "Effect01.png";
let obj = ObjPrim_Create(OBJ_SPRITE_LIST_2D); //2Dスプライトリストオブジェクト生成
Obj_SetRenderPriorityI(obj, 21); //描画優先度を設定
ObjPrim_SetTexture(obj, path); //テクスチャを設定
//1つめ描画元(44, 54)-(71,105)を45°回転、2倍拡大で、(100, 150)に描画
ObjSpriteList2D_SetSourceRect(obj, 44, 54, 71, 105); //描画元設定(44, 54)-(71,105)
ObjSpriteList2D_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)に移動
ObjSpriteList2D_AddVertex(obj); //描画対象追加
//2つめ描画元(81, 117)-(25, 143)を45°回転、2倍拡大で、(200, 300)に描画
ObjSpriteList2D_SetSourceRect(obj, 81, 117, 125, 143); //描画元設定(81, 117)-(25, 143)
ObjSpriteList2D_SetDestCenter(obj); //頂点を(0, 0)中心に配置
ObjRender_SetPosition(obj, 200, 300, 0); //(200, 300)に移動
ObjSpriteList2D_AddVertex(obj); //描画対象追加
//3つめ描画元(140, 39)-(186, 86)を0°回転、2倍拡大で、(300, 200)に描画
ObjSpriteList2D_SetSourceRect(obj, 140, 39, 186, 86); //描画元設定(140, 39)-(186, 86)
ObjSpriteList2D_SetDestCenter(obj); //頂点を(0, 0)中心に配置
ObjRender_SetAngleZ(obj, 0); //0°回転
ObjRender_SetPosition(obj, 300, 200, 0); //(300, 200)に移動
ObjSpriteList2D_AddVertex(obj); //描画対象追加
//240フレーム待機
loop(240){yield;}
Obj_Delete(obj); //描画オブジェクト削除
//ステージ終了
CloseStgScene();
}