Beispiel #1
0
    void Update()
    {
        if (fframe == 0)
        {
            ep.AllAwake(0);
            ep.AllAwake(1);
            EnemyManager.gi.AllAwake(0);
            for (int i = 0; i < 16; ++i)
            {
                ep.Run();
            }
            ++fframe;
        }
        else if (fframe == 1)
        {
            ++fframe;
        }
        else if (fframe == 2)
        {
            ep.AllSleep(0);
            ep.AllSleep(1);
            var v0 = Vector3.zero;
            for (int i = 0; i < 2048; ++i)
            {
                ep.GetObject(0, v0).SetSmall();
            }
            for (int i = 0; i < 512; ++i)
            {
                ep.GetObject(1, v0).SetSmall();
            }

            Enemy ene;
            EnemyManager.gi.AllSleep(0);
            for (int i = 0; i < 512; ++i)
            {
                ene = EnemyManager.gi.GetObject(0, v0);
                // ene.SetModel(0);
            }
            ep.Run();
            ++fframe;
        }
        else if (fframe == 3)
        {
            ep.AllSleep(0);
            ep.AllSleep(1);
            var v0 = Vector3.zero;
            for (int i = 0; i < 2048; ++i)
            {
                ep.GetObject(0, v0).SetSmall();
            }
            for (int i = 0; i < 512; ++i)
            {
                ep.GetObject(1, v0).SetSmall();
            }

            Enemy ene;
            EnemyManager.gi.AllSleep(0);
            for (int i = 0; i < 512; ++i)
            {
                ene = EnemyManager.gi.GetObject(0, v0);
                // ene.SetModel(0);
            }
            ep.Run();
            ++fframe;
        }
        else if (fframe == 4)
        {
            ep.AllSleep(0);
            ep.AllSleep(1);
            EnemyManager.gi.AllSleep(0);
            EnemyManager.gi.AllSleep(1);
            ++fframe;
            bgm.SetActive(true);
        }
        //fps.Update();
        //var sc = fpsView.transform.localScale;
        //sc.x = (fps.GetFPS() - 50) / 10f * 0.75f;
        //if (sc.x <= 0f) { sc.x = 0f; }
        //fpsView.transform.localScale = sc;

        if (isGameOver)
        {
            if (gowait < 24)
            {
                pl.trans.localScale = Effect.v0;
                ++gowait;
                for (int i = 0; i < 12; ++i)
                {
                    var obj = EffectPool.gi.GetObject(0, pl.trans.position);
                    obj.SpdExt(Random.Range(1f, 2.25f));
                }
                goto goWaitNormalLoop;
            }

            scManager.UpdateView();
            cManager.UpdateView();

            if (!isScoreBoardProcEnd && useRanking)
            {
                isScoreBoardProcEnd = true;
                naichilab.RankingLoader.Instance.SendScoreAndShowRanking(ScoreManager.GetScore());

                goCnt = 1;
            }

            if (useRanking)
            {
                if (naichilab.RankingSceneManager.windowClosed)
                {
                    useRanking = false;
                }
            }
            else
            {
                if (goCnt == 60)
                {
                    fc.isFadeIn = false;
                    fc.Time     = 60;
                    fc.StartProc();
                }
                if (goCnt == 120)
                {
                    SceneManager.LoadScene("title");
                }

                ++goCnt;
            }

            return;
        }

goWaitNormalLoop:

        ++cnt;

        //
        BGProc();

        if (cnt < 10)
        {
            return;
        }

        if (isBossStage && !beforeIsBoss)
        {
            beforeIsBoss = true;
            stage.StartBoss();
        }

        pl.SetBefPosToCurrentPos();
        stage.Run();
        EnemyManager.gi.Run();
        ep.Run();
        crManager.Run();
        pl.Run();

        //
        scManager.UpdateView();
        cManager.UpdateView();

        //
        Physics.SyncTransforms();
        Physics.Simulate(0.01666666f);
    }