Cirno2022/script/ExRumia/ExRumia01.txt

120 lines
5.1 KiB
Plaintext
Raw Permalink Normal View History

<EFBFBD><EFBFBD>//Ex<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<1A>8^>_U^1
#include"script/default_system/Default_ShotConst.txt"
#include"script/default_system/Default_Effect.txt"
let objEnemy;
@Initialize
{
objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
ObjEnemy_Regist(objEnemy);
TWork;
TRender;
TEnd;
DeleteShotAll(TYPE_ALL, TYPE_ITEM);//<00>Q<EFBFBD>sh0 TBfk0ue>_<>0hQf0JRd<52>
}
@MainLoop
{
yield;
}
@Event
{
alternative(GetEventType())
case(EV_REQUEST_LIFE)
{
SetScriptResult(1500);//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>01500k0-<2D><>[
}
case(EV_REQUEST_TIMER)
{
SetScriptResult(60);//Bf<42><66>6RP<52><50>060<00>yk0-<2D><>[
}
}
//----------------------------------------------------
//ue<75>R\O
//----------------------------------------------------
task TWork
{
//<00>^j(cx, 60)x060<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0K0Q0f0<66>y<EFBFBD>RY0<59>0
let cx = GetStgFrameWidth() / 2;//STG<00>0<EFBFBD>0<EFBFBD>0n0-N<>_x<00>^j<>0<EFBFBD>S<EFBFBD>_
ObjMove_SetDestAtFrame(objEnemy, cx, 60, 60);
loop(60){yield;}
let frame = 0;
while(!Obj_IsDeleted(objEnemy))
{
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
if(frame % 8 == 0)
{
let i=0;
while(i<360)
{
CreateShotA2(ex, ey, 7, i+frame,-0.4,4,DS_RICE_S_BLUE, 0);//>_<>0zv\
CreateShotA2(ex, ey, 5, i-frame,-0.4,3,DS_RICE_S_RED, 0);
i+=30;
}
}
if(frame == 90)
{
let px = GetPlayerX();
ObjMove_SetDestAtFrame(objEnemy, px + rand(-50, 50), rand(20, 50), 60);
}
if(frame == 150){frame = 29;};
ObjEnemy_SetIntersectionCircleToShot(objEnemy, ex, ey, 32);//S__0<5F>0$R<>[(<00><>>_){v2<76>
ObjEnemy_SetIntersectionCircleToPlayer(objEnemy, ex, ey, 24);//S__0<5F>0$R<>[(SOS__0<5F>0){v2<76>
frame++;
yield;
}
}
//----------------------------------------------------
//<00>c;u<>0<EFBFBD>0<EFBFBD>0
//----------------------------------------------------
task TRender
{
let imgExRumia = GetCurrentScriptDirectory~"ExRumia.png";
ObjPrim_SetTexture(objEnemy, imgExRumia);
while(!Obj_IsDeleted(objEnemy))
{
let angle = ObjMove_GetAngle(objEnemy);
let speed = ObjMove_GetSpeed(objEnemy);
if(speed == 0){ObjSprite2D_SetSourceRect(objEnemy, 64, 1, 127, 64);}
else if(cos(angle) > 0){ObjSprite2D_SetSourceRect(objEnemy, 192, 1, 255, 64);}
else if(cos(angle) < 0){ObjSprite2D_SetSourceRect(objEnemy, 128 ,1, 191, 64);}
ObjSprite2D_SetDestCenter(objEnemy);
yield;
}
}
//----------------------------------------------------
//B}<7D>N<EFBFBD>__j<5F>0<EFBFBD>0<EFBFBD>0
//----------------------------------------------------
task TEnd
{
while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0)
{
yield;
}
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
TExplosionA(ex, ey, 10, 0.6);
DeleteShotAll(TYPE_ALL, TYPE_ITEM);//ue>_<>0hQf0JRd<52>
Obj_Delete(objEnemy);
loop(30){yield;}
CloseScript(GetOwnScriptID());
}