public override void Balance()
    {
        base.Balance();

        var scn = SceneManager.Instance.GetCurScene() as StageScene;

        uint score  = scn.GetSceneScore();
        int  result = scn.GetResult();

        scn.StopBgSound();

        //设置定身;
        PlayerController.Instance.SetFreeze(true);
        //清怪;
        //scn.DestroyCurGrowthTrigger();

        if (mScene.GetResult() > 0)
        {
            uint passtime = mScene.GetLogicRunTime();

            StageGrade grade = StageGrade.StageGrade_Invalid;

            if (passtime < mRes.mTimeS)
            {
                grade = StageGrade.StageGrade_S;
            }
            else if (passtime < mRes.mTimeA)
            {
                grade = StageGrade.StageGrade_A;
            }
            else if (passtime < mRes.mTimeB)
            {
                grade = StageGrade.StageGrade_B;
            }
            else
            {
                grade = StageGrade.StageGrade_C;
            }

            mEndModule.SetPassTime(passtime);
            mEndModule.SetGrade(grade);
            mEndModule.SetExp(mRes.mAwardExp);
            mBalanceModule.SetPassTime(passtime);
            mBalanceModule.SetGrade(grade);

            OpenEndUI();
        }
        else
        {
            OpenFailedUI();
        }
    }
Example #2
0
    override public void Balance()
    {
        if (mScene.GetResult() > 0)
        {
            mScene.DropPassAward();

            uint passtime = mScene.GetLogicRunTime();

            StageGrade grade = StageGrade.StageGrade_Invalid;

            if (passtime < mRes.mTimeS)
            {
                grade = StageGrade.StageGrade_S;
            }
            else if (passtime < mRes.mTimeA)
            {
                grade = StageGrade.StageGrade_A;
            }
            else if (passtime < mRes.mTimeB)
            {
                grade = StageGrade.StageGrade_B;
            }
            else
            {
                grade = StageGrade.StageGrade_C;
            }

            mEndModule.SetPassTime(passtime);
            mEndModule.SetGrade(grade);
            mEndModule.SetExp(mRes.mAwardExp);
            mBalanceModule.SetPassTime(passtime);
            mBalanceModule.SetGrade(grade);

            OpenEndUI();
        }
        else
        {
            OpenFailedUI();
        }

        SceneManager.Instance.StartTimeScale(0.2f, 3000);
        CameraController.Instance.PlayCameraEffect(6.0f, mScene.GetCameraInfo().z, 0.8f);
    }