script_enemy_main
{
	#include_function ".\Bullet_function.txt"
	#include_function ".\Enemy function.txt"

	@Initialize{
	SetX(GetX);
	SetY(GetY);
	SetLife(80);
	SetScore(100);
	SetDamageRate(100,33);
	LoadGraphic(imgzako);
	SetTexture(imgzako);
	SetGraphicRect(0,256,32,288);
	Shot(GetArgument);
	Move();
	}

	@MainLoop{
	SetCollisionA(GetX,GetY,24);
	ChackBonus;
	yield;
	}

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	if(BeVanished() == false){
	MasicPointAddNormal(0.5);
	MagicPowerAdd(false);
	loop(1 + scorebonus){
	let x = GetX + rand(-8,8);
	let y = GetY + rand(-8,8);
	CreateItem(ITEM_SCORE,x,y);
	}
	}
	}

	task Shot(level){
	loop{
	loop(30){yield;}
	let angle = GetAngleToPlayer;
	BreakShotA(angle,8+8*level);
	loop(100/(level + 1)){yield;}
	}
	}

	task Move(){
	SetMovePosition02(GetX,GetClipMaxY+32,400);
	loop(450){yield;}
	VanishEnemy;
	}

}