#東方弾幕風 #Title[霙] #Text[簡単に作れそうなの見つけたからつい衝動的に作ってしまった] #ScriptVersion[2] script_enemy_main { let imgBoss = "script\img\ExRumia.png"; let wind =0; @Initialize { SetX(GetCenterX); SetY(GetClipMinY + 120); SetLife(1000); SetDamageRate(12, 6); LoadGraphic(imgBoss); SetTexture(imgBoss); SetGraphicRect(0, 0, 63, 63); SetShotAutoDeleteClip(200, 64, 200, 64); TMain; } @MainLoop { SetCollisionA(GetX, GetY, 24); SetCollisionB(GetX, GetY, 24); yield; } @DrawLoop { DrawGraphic(GetX, GetY); } @Finalize { DeleteGraphic(imgBoss); } task TMain{ CutIn(YOUMU, "霙", "", 0, 0, 0, 0); SetTimer(90); SetScore(100000); yield; loop{ loop(300){ Rain(rand(GetClipMinX-120, GetClipMaxX+120), GetClipMinY - 30, 3 + rand(0, 1/2), rand(88, 92)); yield; Rain(rand(GetClipMinX-120, GetClipMaxX+120), GetClipMinY - 30, 3 + rand(0, 1/2), rand(88, 92)); Snow(rand(GetClipMinX-120, GetClipMaxX+120), GetClipMinY - 30, rand(0,1) , rand(80, 90)); loop(2){yield} } Concentration02(60); loop(60){yield} wind = rand(-24, +24); } } task Rain (SX, SY, SS, SA) { let obj = Obj_Create(OBJ_SHOT); Obj_SetPosition(obj, SX, SY); Obj_SetSpeed(obj, SS); Obj_SetAngle(obj, SA); ObjShot_SetGraphic(obj, BLUE11); let a = 1/100; let speed = 0; while(Obj_GetY(obj) < GetClipMaxY){ Obj_SetAngle(obj, SA + wind/3); Obj_SetSpeed(obj, SS + speed ); speed+=a; if(speed > 8){ speed = 8; } yield; } CreateShotA(01, Obj_GetX(obj), Obj_GetY(obj), 45); SetShotDataA(01, 0,0,0,0,0,0,BLUE01); SetShotKillTime(01, 0); FireShot(01); Obj_Delete(obj); return; } task Snow (SX, SY, SS, SA) { let obj = Obj_Create(OBJ_SHOT); Obj_SetPosition(obj, SX, SY); Obj_SetSpeed(obj, SS); Obj_SetAngle(obj, SA); ObjShot_SetGraphic(obj, WHITE05); let a = 1/100; let speed = 0; while(Obj_GetY(obj) < GetClipMaxY){ Obj_SetAngle(obj, SA + wind ); Obj_SetSpeed(obj, SS + speed); speed+=a; if(speed > 2){ speed = 2; } yield; } CreateShotA(01, Obj_GetX(obj), Obj_GetY(obj), 10); SetShotDataA(01, 0,0,0,0,0,0,WHITE01); SetShotKillTime(01, 0); FireShot(01); Obj_Delete(obj); return; } }