Пример #1
0
        // 分数公式
        public void AddScore(JudgmentType judgment, int combo)
        {
            switch (judgment)
            {
            case JudgmentType.Kool:
                Kool++;
                switch (PlayManager.JudgmentMode)
                {
                case JudgmentDelta.Mode.Normal:
                    RawScore += 170 + 17 * Mathf.Log(combo, 2);
                    break;

                case JudgmentDelta.Mode.Easy:
                    RawScore += 150 + 15 * Mathf.Log(combo, 2);
                    break;

                case JudgmentDelta.Mode.Hard:
                    RawScore += 200 + 20 * Mathf.Log(combo, 2);
                    break;
                }
                PlayManager.HP += GaugeUpDownRate.Cool;
                break;

            case JudgmentType.Cool:
                Cool++;
                switch (PlayManager.JudgmentMode)
                {
                case JudgmentDelta.Mode.Normal:
                    RawScore += 100 + 10 * Mathf.Log(combo, 2);
                    break;

                case JudgmentDelta.Mode.Easy:
                    RawScore += 80 + 8 * Mathf.Log(combo, 2);
                    break;

                case JudgmentDelta.Mode.Hard:
                    RawScore += 100 + 10 * Mathf.Log(combo, 2);
                    break;
                }
                RawScore       += 100 + 10 * Mathf.Log(combo, 2);
                PlayManager.HP += GaugeUpDownRate.Cool;
                break;

            case JudgmentType.Good:
                Good++;
                RawScore       += 40 + 4 * Mathf.Log(combo, 2);
                PlayManager.HP += GaugeUpDownRate.Good;
                break;

            case JudgmentType.Miss:
                Miss++;
                PlayManager.HP += GaugeUpDownRate.Miss;
                break;

            case JudgmentType.Fail:
                Fail++;
                PlayManager.HP += GaugeUpDownRate.Fail;
                break;
            }
        }
Пример #2
0
    public void AddHit(JudgmentType judge, int add = 1)
    {
        mJudgeToHitCount[judge] += add;
        {
            var missed = (judge == JudgmentType.OK || judge == JudgmentType.MISS);
            if (missed)
            {
                Combo = 0;
            }
            else
            {
                Combo++;
                MaxCombo = Mathf.Max(Combo, MaxCombo);
            }
        }

        {
            var basePoint   = 1000000.0f / (1275.0f + 50.0f * (TotalNotes - 50));
            int comboModipy = Mathf.Min(Combo, 50);
            Score += (int)Mathf.Floor(basePoint * comboModipy * mJudgeAmount[judge]);
        }

        {
            var judgeValue  = Mathf.Floor(100.0f * ((mJudgeToHitCount[JudgmentType.PERFECT] * 85.0f + mJudgeToHitCount[JudgmentType.GREAT] * 35.0f) / TotalNotes)) / 100.0f;
            var sucessRatio = 0.0f;                                                                                    // 未対応
            var comboValue  = Mathf.Floor(100.0f * ((MaxCombo * 5.0f / TotalNotes) + (sucessRatio * 10.0f))) / 100.0f; // 小数第3位以下切り捨て

            Achievement = (Mathf.Floor(100.0f * ((judgeValue + comboValue) * mAutoPlayModify)) / 100.0f);              // 小数第3位以下切り捨て
        }
        Skill      = Mathf.Floor(100.0f * ((Achievement * mScoreDifficulty * 20.0f) / 100.0f)) / 100.0f;               // 小数第3位以下切り捨て
        GradeDirty = true;
    }
Пример #3
0
 void OnChipHitted(Chip chip, JudgmentType judgeType, bool playSound, bool judge, bool hide, double time)
 {
     mChipPlayingState[chip].Hitted = true;
     if (playSound && (judgeType != JudgmentType.MISS))
     {
         if (!mChipPlayingState[chip].Uttered)
         {
             PlayChipSound(chip);
             mChipPlayingState[chip].Uttered = true;
         }
     }
     if (judge)
     {
         var drumChipProperty = UserManager.Instance.LoggedOnUser.DrumChipProperty[chip.ChipType];
         if (judgeType != JudgmentType.MISS)
         {
             mDrumPad.OnHit(drumChipProperty.DisplayTrackType);
             mChipLight.OnHit(drumChipProperty.DisplayTrackType);
         }
         mResultTextColumn.OnHit(drumChipProperty.DisplayTrackType, judgeType);
         MainScript.Instance.CurrentGrade.AddHit(judgeType);
     }
     if (hide)
     {
         if (judgeType == JudgmentType.MISS)
         {
             // MISSチップは最後まで表示し続ける。
         }
         else
         {
             // PERFECT~POOR チップは非表示。
             mChipPlayingState[chip].Visiable = false;
         }
     }
 }
Пример #4
0
 public void Play(JudgmentType judgment)
 {
     IsPlay = true;
     if (judgment == JudgmentType.Good)
     {
         scale = 0.6f;
     }
     else
     {
         scale = 1;
     }
 }
Пример #5
0
    public void AddJudgementType(JudgmentType judge)
    {
        switch (judge)
        {
        case JudgmentType.PERFECT: this.ExciteGauge += 0.025f; break;

        case JudgmentType.GREAT: this.ExciteGauge += 0.01f; break;

        case JudgmentType.GOOD: this.ExciteGauge += 0.005f; break;

        case JudgmentType.OK: this.ExciteGauge += 0f; break;

        case JudgmentType.MISS: this.ExciteGauge -= 0.08f; break;
        }
        ExciteGauge = Mathf.Max(Mathf.Min(this.ExciteGauge, 1.0f), 0.0f);
    }
Пример #6
0
    public void OnHit(DisplayTrackType displayTrackType, JudgmentType judgmentType)
    {
        if (!mTrackDrumMap.ContainsKey(displayTrackType))
        {
            return;
        }

        var animation = mTrackDrumMap[displayTrackType];

        animation.gameObject.SetActive(true);
        if (animation.isPlaying)
        {
            animation.Stop();
        }
        animation.Play(judgmentType.ToString());
    }
Пример #7
0
        public static float GetJudgmentDelta(JudgmentType judgment, float scale)
        {
            switch (judgment)
            {
            case JudgmentType.Kool:
                return(Kool * scale * globalScale);

            case JudgmentType.Cool:
                return(Cool * scale * globalScale);

            case JudgmentType.Good:
                return(Good * scale * globalScale);

            case JudgmentType.Miss:
                return(Miss * scale * globalScale);

            default:
                return(-1);
            }
        }
Пример #8
0
        public static bool CompareJudgmentDelta(double delta, JudgmentType judgment, float scale)
        {
            switch (judgment)
            {
            case JudgmentType.Kool:
                return(delta <= GetJudgmentDelta(JudgmentType.Kool, scale));

            case JudgmentType.Cool:
                return(delta > GetJudgmentDelta(JudgmentType.Kool, scale) && delta <= GetJudgmentDelta(JudgmentType.Cool, scale));

            case JudgmentType.Good:
                return(delta > GetJudgmentDelta(JudgmentType.Cool, scale) && delta <= GetJudgmentDelta(JudgmentType.Good, scale));

            case JudgmentType.Miss:
                return(delta > GetJudgmentDelta(JudgmentType.Good, scale) && delta <= GetJudgmentDelta(JudgmentType.Miss, scale));

            default:
                return(false);
            }
        }
 public void Play(JudgmentType Judgment)
 {
     isPlay       = true;
     judgmentType = Judgment;
 }