task BossName{
let X=0;
let Y=25;
let Img1="script\img-System\EffectSet-1.png";
let rect01=1;
let rect02=241;
let rect03=13;
let rect04=13;
let Layer=7;
let W=(rect03-rect01)/2;
let H=(rect04-rect02)/2;
let Angle1=0;
let Angle2=40;
let Angle3=40;
let Scale=1;
let Frame1=0;
let Set1=0;
let Set2=0;
let Set3=0;
let Set4=0;
let Set5=0;
let Alpha=0;
let Obj=Obj_Create(OBJ_EFFECT);
let Boss=0;
X=GetCenterX-155;
Boss=GetCommonData("BossNumber");
LoadGraphic(Img1);
ObjEffect_SetTexture(Obj,Img1);
ObjEffect_SetRenderState(Obj,ALPHA);
ObjEffect_SetPrimitiveType(Obj, PRIMITIVE_TRIANGLEFAN);
ObjEffect_CreateVertex(Obj,4);
ObjEffect_SetLayer(Obj,Layer);
Obj_SetPosition(Obj,X,Y);
ObjEffect_SetAngle(Obj,0,0,0);
ObjEffect_SetScale(Obj,1.0,1.0);
ObjEffect_SetVertexXY(Obj,0,-W,-H);
ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);
ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);
ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);
ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
ObjEffect_SetVertexColor(Obj,0,255,255,255,255);
ObjEffect_SetVertexColor(Obj,1,255,255,255,255);
ObjEffect_SetVertexColor(Obj,2,255,255,255,255);
ObjEffect_SetVertexColor(Obj,3,255,255,255,255);
loop{
rect01=1;rect02=240;rect03=71;rect04=255;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
yield;	
}
}

task LifeStar1{
let X=0;
let Y=37;
let Img1="script\img-System\LifeStar.png";
let rect01=0;
let rect02=0;
let rect03=13;
let rect04=13;
let Layer=7;
let W=(rect03-rect01)/2;
let H=(rect04-rect02)/2;
let Angle1=0;
let Angle2=40;
let Angle3=40;
let Scale=1;
let Frame1=0;
let Set1=0;
let Set2=0;
let Set3=0;
let Set4=0;
let Set5=0;
let Alpha=0;
let Obj=Obj_Create(OBJ_EFFECT);
let Life=0;
X=GetCommonData("SetStarX");
Life=GetCommonData("SetStar");
LoadGraphic(Img1);
ObjEffect_SetTexture(Obj,Img1);
ObjEffect_SetRenderState(Obj,ALPHA);
ObjEffect_SetPrimitiveType(Obj, PRIMITIVE_TRIANGLEFAN);
ObjEffect_CreateVertex(Obj,4);
ObjEffect_SetLayer(Obj,Layer);
Obj_SetPosition(Obj,X,Y);
ObjEffect_SetAngle(Obj,0,0,0);
ObjEffect_SetScale(Obj,1.0,1.0);
ObjEffect_SetVertexXY(Obj,0,-W,-H);
ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);
ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);
ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);
ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
ObjEffect_SetVertexColor(Obj,0,255,255,255,255);
ObjEffect_SetVertexColor(Obj,1,255,255,255,255);
ObjEffect_SetVertexColor(Obj,2,255,255,255,255);
ObjEffect_SetVertexColor(Obj,3,255,255,255,255);
loop{
if(Life==0){
rect01=0;rect02=0;rect03=0;rect04=0;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==1){
rect01=0;rect02=0;rect03=13;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==2){
rect01=0;rect02=0;rect03=26;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==3){
rect01=0;rect02=0;rect03=39;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==4){
rect01=0;rect02=0;rect03=52;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==5){
rect01=0;rect02=0;rect03=65;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==6){
rect01=0;rect02=0;rect03=78;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==7){
rect01=0;rect02=0;rect03=91;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==8){
rect01=0;rect02=0;rect03=104;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==9){
rect01=0;rect02=0;rect03=117;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
if(Life==10){
rect01=0;rect02=0;rect03=130;rect04=13;
W=(rect03-rect01)/2;H=(rect04-rect02)/2;
ObjEffect_SetVertexXY(Obj,0,-W,-H);ObjEffect_SetVertexXY(Obj,1,W,-H);
ObjEffect_SetVertexXY(Obj,2,W,H);ObjEffect_SetVertexXY(Obj,3,-W,H);
ObjEffect_SetVertexUV(Obj,0,rect01,rect02);ObjEffect_SetVertexUV(Obj,1,rect03,rect02);
ObjEffect_SetVertexUV(Obj,2,rect03,rect04);ObjEffect_SetVertexUV(Obj,3,rect01,rect04);
}
yield;	
}
}


