
#Title[逃亡]
#Text[] 
#Image[.]
#BackGround[User]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let csd = GetCurrentScriptDirectory;
    let imgBoss =csd ~ "..\lib/dot_sunnymilk.png"; 
    // 初期位置
    let xIni    = GetCenterX;
    let yIni    = GetClipMinY + 128;
	let wIni=30;
    @Initialize {
	SetCommonData("NoCollision",true);
	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 {
	SetCommonData("NoCollision",false);
    }

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

sub standBy//初期位置へ
{
	wait(30);
	SetAction(ACT_MOVE, 90);
	SetMovePosition02(GetClipMaxX+128, GetClipMinY+0, wIni);
	ascent(i in 0..15)
	{
		SetAlpha(255-255*i/15);
		yield;
	}
	wait(45);
	VanishEnemy;
}

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