
#Title[逃亡]
#Text[]
#Image[.]
#BackGround[User]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let csd = GetCurrentScriptDirectory;
    let imgBoss =csd ~ "..\lib/dot_lunachild.png"; 
    let imgBoss2 =csd ~ "..\lib/dot_lunachild2.png"; 
    // 初期位置
    let xIni    = GetCenterX;
    let yIni    = GetClipMinY + 128;
	let wIni=30;
    @Initialize {
	SetX(GetCommonDataDefault("BossX",0));
	SetY(GetCommonDataDefault("BossY",0));
	MagicCircle(false);
       LoadUserShotData(GetCurrentScriptDirectory~".\img\shot_All.txt");
        SetLife(1);
	InitializeAction();
        TMain;
    }

    @MainLoop {
	//SetCollisionA(GetX, GetY, 48);
        yield;
    }

    @DrawLoop {
	DrawBoss( imgBoss );
    }

    @Finalize {
    }

    // メインタスク
task TMain 
{
	//Lissajous(255,255,127);
	BossShadowAnimation(imgBoss2,0,255,255,127);
	//SetCommonData("BOSSDEFEAT",true);
	standBy;
}

sub standBy//初期位置へ
{
	wait(30);
	SetAction(ACT_MOVE, 60);
	SetMovePosition03(GetClipMaxX-64, GetClipMinY+96, 20,5);
	wait(60);

	SetMovePosition02(GetClipMinX-128, GetClipMinY+32, wIni);
	wait(90);
	VanishEnemy;
}

#include_function ".\..\txt\data.txt"
#include_function ".\..\lib/lib_anime_Lunachild.txt"
}
