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

	@Initialize{
	SetX(GetX);
	SetY(GetY);
	SetLife(350);
	SetScore(200);
	SetDamageRate(100,33);
	LoadGraphic(imgzako);
	SetTexture(imgzako);
	SetGraphicRect(0,128,32,160);
	Shot(GetArgument);
	Move();
	}

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

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	if(BeVanished() == false){
	MasicPointAddNormal(1.5);
	loop(6 + 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;
	let speed = 1.5;
	AroundToShot(GetX,GetY,64,9+level*9,50,2,angle,GetAngleToPlayer,true,false,RED32,20);
	AroundToShot(GetX,GetY,64,9+level*9,50,2,angle,90,false,false,RED32,20);
	loop(100/(level + 1)){yield;}
	}
	}

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

}