private void Awake() { if (!StartScrScript.useEffect) { postProcessingV2.enabled = false; } Camera.main.depthTextureMode |= DepthTextureMode.Depth; EnemyBurn.InitAliveCnt(); isGameOver = false; isBossStage = false; fc.gameObject.SetActive(true); if (InitStatic) { MoveTranslate.InitStaticPool(); // MoveTranslate.GP.Allocate(32); MoveAddPos.InitStaticPool(); MoveAddPos.GP.Allocate(512); MoveAddPosStop.InitStaticPool(); MoveAddPosStop.GP.Allocate(32); MoveAddPosExt.InitStaticPool(); MoveAddPosExt.GP.Allocate(32); EBul01.InitStaticPool(); EBul01.GP.Allocate(32); EBul02.InitStaticPool(); EBul02.GP.Allocate(4); EBul03.InitStaticPool(); EBul03.GP.Allocate(32); EBul04.InitStaticPool(); EBul04.GP.Allocate(1); EBul05.InitStaticPool(); EBul05.GP.Allocate(1); EBul06.InitStaticPool(); EBul06.GP.Allocate(1); InitStatic = false; } memSpaceAlloc = new int[8192]; }
void Pat1() { const int currentPtrMax = 19; if (waitingEnemy + EnemyBurn.AliveCnt <= 0) { ++currentPointer; switch (currentPointer % currentPtrMax) { case 0: case 1: SetPat(8, 15); break; case 2: case 3: SetPat(6, 18); break; case 4: SetPat(150, 6); break; case 5: SetPat(1, 1); break; case 6: SetPat(15, 24); break; case 7: SetPat(5, 64); break; case 8: case 10: SetPat(4, 10); break; case 9: case 11: SetPat(4, 10); break; case 12: SetPat(50, 20); break; case 13: SetPat(90, 6); break; case 14: SetPat(25, 15); break; case 15: SetPat(3, 24); break; case 16: SetPat(3, 64); break; case 17: SetPat(1, 11); break; case 18: SetPat(3, 48); break; } curCnt = 0; } // if (curCnt % curInterval == 0 && waitingEnemy > 0) { EnemyBurn ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); MoveAddPos mp = null; MoveAddPosStop mp2 = null; MoveAddPosExt mp3 = null; EBul01 eb01 = null; EBul02 eb02 = null; EBul03 eb03 = null; EBul04 eb04 = null; // 敵作成 HP1200程度が全力1秒漏れなしショット, 1セット4発で80 switch (currentPointer % currentPtrMax) { case 0: case 8: case 10: tmpVec.Set(6f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(80, 3, 1, 90); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(8f * 0.02f, -90f); ene.AddScript(mp); break; case 1: case 9: case 11: tmpVec.Set(-6f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(80, 3, 1, 90); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(8f * 0.02f, -90f); ene.AddScript(mp); break; case 2: tmpVec.Set(10f, 4f, 0f); ene.trans.position = tmpVec; ene.Settings(120, 3, 2, 120); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(12f * 0.02f, 180f); ene.AddScript(mp); break; case 3: tmpVec.Set(-10f, 4f, 0f); ene.trans.position = tmpVec; ene.Settings(120, 3, 2, 120); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(12f * 0.02f, 0f); ene.AddScript(mp); break; case 4: tmpVec.Set(4f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(2300, 3, 5, 300); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(2.35f * 0.02f, -105f); ene.AddScript(mp); eb01 = EBul01.GP.GetSleep(); eb01.Settings(60, 3, true, 60f, 8f); ene.AddScript(eb01); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-4f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(2300, 3, 5, 300); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(2.35f * 0.02f, -75f); ene.AddScript(mp); eb01 = EBul01.GP.GetSleep(); eb01.Settings(60, 3, true, 60f, 8f); ene.AddScript(eb01); --waitingEnemy; break; case 5: tmpVec.Set(0f, -8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(6000, 5, 5, 270); mp2 = MoveAddPosStop.GP.GetSleep(); mp2.Settings(120, 300); mp2.SetSpdDeg(12f * 0.02f, 90f); mp2.SetSpd2Deg(2.5f * 0.02f, 90f); ene.AddScript(mp2); eb02 = EBul02.GP.GetSleep(); ene.AddScript(eb02); break; case 6: tmpVec.Set(10f, 5.5f, 0f); ene.trans.position = tmpVec; ene.Settings(300, 3, 3, 240); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(2.5f * 0.02f, -160f); ene.AddScript(mp); eb01 = EBul01.GP.GetSleep(); eb01.Settings(100, 3, true, 60f, 8f); ene.AddScript(eb01); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-10f, 5.5f, 0f); ene.trans.position = tmpVec; ene.Settings(300, 3, 3, 240); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(2.5f * 0.02f, -20f); ene.AddScript(mp); eb01 = EBul01.GP.GetSleep(); eb01.Settings(100, 3, true, 60f, 8f); ene.AddScript(eb01); --waitingEnemy; break; case 7: case 15: tmpVec.Set(Random.Range(-6.5f, 6.5f), 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(90, 3, 1, 360); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(5f * 0.02f, Random.Range(-115f, -65f)); ene.AddScript(mp); eb03 = EBul03.GP.GetSleep(); eb03.Settings(60, 3, 120, 6, 0.8f, 360, 12f); ene.AddScript(eb03); break; case 12: tmpVec.Set(9, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(90, 3, 2, 200); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(5f * 0.02f, -110); ene.AddScript(mp); eb03 = EBul03.GP.GetSleep(); eb03.Settings(70, 5, 150, 5, 0.8f, 360, 10f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(4f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(90, 3, 2, 200); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(5f * 0.02f, -100); ene.AddScript(mp); eb03 = EBul03.GP.GetSleep(); eb03.Settings(70, 5, 150, 5, 0.8f, 360, 10f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-4f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(90, 3, 2, 200); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(5f * 0.02f, -80); ene.AddScript(mp); eb03 = EBul03.GP.GetSleep(); eb03.Settings(70, 5, 150, 5, 0.8f, 360, 10f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-9f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(90, 3, 2, 200); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(5f * 0.02f, -70); ene.AddScript(mp); eb03 = EBul03.GP.GetSleep(); eb03.Settings(70, 5, 150, 5, 0.8f, 360, 10f); ene.AddScript(eb03); waitingEnemy -= 3; break; case 13: tmpVec.Set(0, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(1300, 3, 2, 200); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.975f, 60); mp3.SetSpdDeg(7f * 0.02f, -90); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(70, 7, 200, 10, 0.6f, 360, 13f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(7f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(1000, 3, 5, 270); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.975f, 60); mp3.SetSpdDeg(9f * 0.02f, -100); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(70, 6, 200, 10, 0.6f, 360, 13f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-7f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(1000, 3, 5, 270); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.975f, 60); mp3.SetSpdDeg(9f * 0.02f, -80); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(70, 6, 200, 10, 0.6f, 360, 13f); ene.AddScript(eb03); waitingEnemy -= 2; break; case 14: tmpVec.Set(0, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(300, 3, 3, 200); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.985f, 60); mp3.SetSpdDeg(10f * 0.02f, -90); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(50, 7, 200, 10, 0.6f, 360, 11f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(7f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(200, 3, 2, 240); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.985f, 60); mp3.SetSpdDeg(9f * 0.02f, -100); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(50, 6, 200, 10, 0.6f, 360, 11f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-7f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(200, 3, 2, 240); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.985f, 60); mp3.SetSpdDeg(9f * 0.02f, -80); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(50, 6, 200, 10, 0.6f, 360, 11f); ene.AddScript(eb03); waitingEnemy -= 2; break; case 16: case 18: tmpVec.Set(1f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(30, 3, 1, 45); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(30f * 0.02f, -92f); ene.AddScript(mp); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-1f, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(30, 3, 1, 45); mp = MoveAddPos.GP.GetSleep(); mp.SetSpdDeg(30f * 0.02f, -88f); ene.AddScript(mp); --waitingEnemy; break; case 17: tmpVec.Set(0f, -8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(5000, 5, 5, 210); mp2 = MoveAddPosStop.GP.GetSleep(); mp2.Settings(90, 600); mp2.SetSpdDeg(13f * 0.02f, 90f); mp2.SetSpd2Deg(2.5f * 0.02f, 90f); ene.AddScript(mp2); eb04 = EBul04.GP.GetSleep(); ene.AddScript(eb04); for (int i = 0; i < 5; ++i) { ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(-1.75f * i, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(500, 3, 2, 300); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.95f, 120); mp3.SetSpdDeg(9f * 0.02f, -90); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(50, 3, 120, 15, 0.4f, 360, 14f); ene.AddScript(eb03); ene = EnemyManager.gi.GetObject(1) as EnemyBurn; // ene.SetModel(1); tmpVec.Set(1.75f * i, 8.5f, 0f); ene.trans.position = tmpVec; ene.Settings(500, 3, 2, 300); mp3 = MoveAddPosExt.GP.GetSleep(); mp3.Settings(0.95f, 120); mp3.SetSpdDeg(9f * 0.02f, -90); ene.AddScript(mp3); eb03 = EBul03.GP.GetSleep(); eb03.Settings(50, 3, 120, 15, 0.4f, 360, 14f); ene.AddScript(eb03); waitingEnemy -= 2; } break; } --waitingEnemy; } ++curCnt; }