// 倍率その他を計算 public static void AddScoreEnemy(int arg) { score += (arg + CubeManager.GetCubeScore() / 50); flag = true; }
protected override void RunMain() { viewObjTrans2.Rotate(9f, 0f, 0f); Move(); MoveSP(); MoveLimit(); Atack(); hitChild.Run(); if (burning > 0) { --burning; if (trans.localScale.x < 1f) { trans.localScale = trans.localScale + BurnScaleAdd; if (trans.localScale.x > 1f) { trans.localScale = Effect.v1; } } var p = trans.position + effTrans; for (int i = 0; i < 3; ++i) { var obj = EffectPool.gi.GetObject(1, p); obj.SpdExt(Random.Range(1.25f, 2.5f)); } } // charge AddCharge(30); ch1.UpdateView(charge / chargeLevel); ch2.UpdateView(charge * 10 / chargeLevel % 10); chargeBar.UpdateView(charge % chargeLevel / 100f); // Life(temerature) float timePenalty = 1f + (float)timeDamageRaise * (1f / 2400f); // 時間経過で被ダメージ量が増加 plTempe += fieldTemp / 600f * timePenalty; // 場の気温が最高だと10秒で死ぬ fieldTemp += (100f / 1800f) * (0.65f + timePenalty * 0.35f); // 何も起こらないと30秒で最大になる if (plTempe >= 80f) { if (beforeCaution <= 0) { SoundList.gi.list[4].transform.position = trans.position; SoundList.gi.list[4].Play(); } beforeCaution = 15; } else { --beforeCaution; } if (Stage.isClear) { plTempe = 0f; } if (GameManager.GetIsGameOver() && !Stage.isClear) { plTempe = 99.925f; } if (plTempe >= 99.925f) { plTempe = 99.925f; burning = 200; if (CubeManager.GetCubeScore() > 99999 && !bossFrag) { if (!GameManager.GetIsGameOver()) { SoundList.gi.list[1].transform.position = trans.position; SoundList.gi.list[1].Play(); } bossFrag = true; plTempe = 0f; fieldTemp = 0f; GameManager.StartBoss(); // GameManager.SetGameOver(); // ボスが実装できたらコメントにしてください } else { if (!GameManager.GetIsGameOver()) { SoundList.gi.list[1].transform.position = trans.position; SoundList.gi.list[1].Play(); } GameManager.SetGameOver(); } } else if (plTempe < 0f) { plTempe = 0f; } if (fieldTemp >= 99.925f) { fieldTemp = 99.925f; } else if (fieldTemp < 0f) { fieldTemp = 0f; } plT1.UpdateView(Mathf.FloorToInt(plTempe / 10f)); plT2.UpdateView(Mathf.FloorToInt(plTempe) % 10); plT3.UpdateView(Mathf.FloorToInt(plTempe * 10f) % 10); fiT1.UpdateView(Mathf.FloorToInt(fieldTemp / 10f)); fiT2.UpdateView(Mathf.FloorToInt(fieldTemp) % 10); fiT3.UpdateView(Mathf.FloorToInt(fieldTemp * 10f) % 10); // bulPool.Run(); mSwordPool.Run(); ++timeDamageRaise; }