//“Œ•û’e–‹•—
//enemy01
#ScriptVersion[2]

script_enemy_main{

#include_function".\lib\include_std.txt"
#include_function".\system\include_enemy.txt"

let animation_counter = 0;

@Initialize{

	SetDamageRate(100,100);
	system_SetEnemyTexture("TYPEXX");
	system_SetEnemyType(0);
	once_system_LoadResource();
	system_SetEnemyLife(100000);
	system_SetEnemyWeight(500);
	system_SetEnemyRadius(16);
	once_MainRoutine();
}

@MainLoop{
	SetCollisionA(GetX(), GetY(), 12);
	animation_counter++;
	yield;
}

@DrawLoop{
	if(system_IsInvisible()){return;}
	SetTexture(img_Enemy);
	SetGraphicScale(0.6,0.6);

	system_SetGraphicRect(["SPHERE_MAIN01","SPHERE_MAIN02","SPHERE_MAIN03","SPHERE_MAIN04"][trunc(animation_counter/4)%4]);
	DrawGraphic(GetX(), GetY());
}

@Finalize{

}


task once_MainRoutine(){
	once_system_TaskSphereParameterChecker();
	once_system_TaskSphereHitTest();
	once_system_EnemyMain();
	once_MoveRoutine();
}

task once_MoveRoutine(){
	system_MoveTypeSelect();
	system_StartMove();

}


}

