#TouhouDanmakufu
#Title[TaskTest]
#Text[Task test.]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main
{
let imgExRumia = "script\ExRumia\img\ExRumia.png";
let frame = 0;
@Initialize
{
SetX(GetCenterX);
SetY(GetClipMinY + 120);
SetLife(4000);
LoadGraphic(imgExRumia);
}
@MainLoop
{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 20);
frame++;
if(90 == frame)
{
shot(GetX, GetY);
}
if(120 == frame)
{
CreateShot01(GetX, GetY, 8, GetAngleToPlayer()-5, BLUE04, 0);
CreateShot01(GetX, GetY, 8, GetAngleToPlayer()+5, BLUE04, 0);
}
if(180 == frame)
{
yield;
frame = 0;
}
}
@DrawLoop
{
SetTexture(imgExRumia);
SetGraphicRect(64, 1, 127, 64);
DrawGraphic(GetX, GetY);
}
@Finalize
{
DeleteGraphic(imgExRumia);
}
task shot(let x, let y)
{
CreateShot01(x, y, 8, GetAngleToPlayer()-10, BLUE03, 0);
CreateShot01(x, y, 8, GetAngleToPlayer()+10, BLUE03, 0);
yield;
CreateShot01(x, y, 8, GetAngleToPlayer(), RED03, 0);
}
}