#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["Test"]
#Text["A demonstration of the three concentrations."]

#include"./ConcTask.txt"

let objBoss;
let frame=0;
let Aim=0;
let Around=0;
let animation=0;
let angle=90;
let angle1=90;
let shot=470;
let move=0;
let s = -1;
let allow=0;
let DIRECTION=1;

@Event
{
	alternative(GetEventType())
	case(EV_REQUEST_LIFE){
		SetScriptResult(8000)
	}
	
	case(EV_REQUEST_TIMER){
		SetScriptResult(140);
		}
}

@Initialize
{	
	objBoss= ObjEnemy_Create(OBJ_ENEMY_BOSS);
	ObjEnemy_Regist(objBoss);

	let imgExRumia = GetCurrentScriptDirectory ~ "Kongaara.png"; //file path to enemy image

	ObjPrim_SetTexture(objBoss, imgExRumia); //Setting the above image file as a texture to the enemy object(objBoss)

	ObjSprite2D_SetSourceRect(objBoss, 0, 0, 56, 62); //Setting the rectangle coordinates in the enemy image to use(Left, Top, Right, Bottom).

	ObjSprite2D_SetDestCenter(objBoss); //Positioning the center of the rectangle(w/texture) at (0, 0) on the stage(top left corner).

	ObjRender_SetScaleXYZ(objBoss, 1.2, 1.2, NULL);
	
	let cx = GetStgFrameWidth() / 2;

	ObjMove_SetDestAtFrame(objBoss, cx, 110, 30);

}

@MainLoop{
	animation++;
		
	if(animation==60){
		Concentration(objBoss, "NOTE", 80, 40, 250, 250, 4, 104, 4, 40);
		}
		
	if(animation==180){
		Concentration(objBoss, "STAR", 80, 40, 20, 250, 20, 250, 20, 250);
		}
		
	if(animation==300){
		Concentration(objBoss, "SNOW", 80, 70, 4, 60, 50, 255, 50, 255);
		}
		
	yield;
	}