Exemple #1
0
        protected override void UpdateCalculations(JudgementInfo judgement)
        {
            if (judgement != null)
            {
                switch (judgement.Result)
                {
                case HitResult.Hit:
                    Combo.Value++;
                    Health.Value += 0.1f;
                    break;

                case HitResult.Miss:
                    Combo.Value   = 0;
                    Health.Value -= 0.2f;
                    break;
                }
            }

            int score    = 0;
            int maxScore = 0;

            foreach (OsuJudgementInfo j in Judgements)
            {
                score    += j.ScoreValue;
                maxScore += j.MaxScoreValue;
            }

            TotalScore.Value = score;
            Accuracy.Value   = (double)score / maxScore;
        }
Exemple #2
0
        public JudgementResult(JudgementInfo judegement)
        {
            Judgement = judegement;
            HitResult = HitResultType.None;

            Reset();
        }
Exemple #3
0
 protected void TriggerOnJudgement(JudgementInfo j)
 {
     OnJudgement?.Invoke(j);
     if (AllObjectsJudged)
     {
         OnAllJudged?.Invoke();
     }
 }
Exemple #4
0
        public void AddJudgement(JudgementInfo judgement)
        {
            Judgements.Add(judgement);

            UpdateCalculations(judgement);

            judgement.ComboAtHit = (ulong)Combo.Value;
        }
Exemple #5
0
        public void AddJudgement(JudgementInfo judgement)
        {
            Judgements.Add(judgement);

            UpdateCalculations(judgement);

            judgement.ComboAtHit = (ulong)Combo.Value;
        }
Exemple #6
0
        public void AddJudgement(JudgementInfo judgement)
        {
            Judgements.Add(judgement);

            UpdateCalculations(judgement);

            judgement.ComboAtHit = (ulong)Combo.Value;
            if (Health.Value == Health.MinValue && !HasFailed)
            {
                HasFailed = true;
                Failed?.Invoke();
            }
        }
        protected override void UpdateCalculations(JudgementInfo judgement)
        {
            if (judgement != null)
            {
                switch (judgement.Result)
                {
                case HitResult.Hit:
                    Combo.Value++;
                    break;

                case HitResult.Miss:
                    Combo.Value = 0;
                    break;
                }
            }

            int score    = 0;
            int maxScore = 0;

            foreach (OsuJudgementInfo j in Judgements)
            {
                switch (j.Score)
                {
                case OsuScoreResult.Miss:
                    maxScore += 300;
                    break;

                case OsuScoreResult.Hit50:
                    score    += 50;
                    maxScore += 300;
                    break;

                case OsuScoreResult.Hit100:
                    score    += 100;
                    maxScore += 300;
                    break;

                case OsuScoreResult.Hit300:
                    score    += 300;
                    maxScore += 300;
                    break;
                }
            }

            TotalScore.Value = score;
            Accuracy.Value   = (double)score / maxScore;
        }
Exemple #8
0
        protected override void UpdateCalculations(JudgementInfo judgement)
        {
            if (judgement != null)
            {
                switch (judgement.Result)
                {
                    case HitResult.Hit:
                        Combo.Value++;
                        Health.Value += 0.1f;
                        break;
                    case HitResult.Miss:
                        Combo.Value = 0;
                        Health.Value -= 0.2f;
                        break;
                }
            }

            int score = 0;
            int maxScore = 0;

            foreach (OsuJudgementInfo j in Judgements)
            {
                switch (j.Score)
                {
                    case OsuScoreResult.Miss:
                        maxScore += 300;
                        break;
                    case OsuScoreResult.Hit50:
                        score += 50;
                        maxScore += 300;
                        break;
                    case OsuScoreResult.Hit100:
                        score += 100;
                        maxScore += 300;
                        break;
                    case OsuScoreResult.Hit300:
                        score += 300;
                        maxScore += 300;
                        break;
                }
            }

            TotalScore.Value = score;
            Accuracy.Value = (double)score / maxScore;
        }
Exemple #9
0
        private void judgement(DrawableHitObject h, JudgementInfo j)
        {
            HitExplosion explosion = new HitExplosion((OsuJudgementInfo)j, (OsuHitObject)h.HitObject);

            judgementLayer.Add(explosion);
        }
Exemple #10
0
        private void judgement(DrawableHitObject h, JudgementInfo j)
        {
            HitExplosion explosion = new HitExplosion((OsuJudgementInfo)j, (OsuHitObject)h.HitObject);

            judgementLayer.Add(explosion);
        }
Exemple #11
0
 /// <summary>
 /// Update any values that potentially need post-processing on a judgement change.
 /// </summary>
 /// <param name="newJudgement">A new JudgementInfo that triggered this calculation. May be null.</param>
 protected abstract void UpdateCalculations(JudgementInfo newJudgement);
Exemple #12
0
 /// <summary>
 /// Update any values that potentially need post-processing on a judgement change.
 /// </summary>
 /// <param name="newJudgement">A new JudgementInfo that triggered this calculation. May be null.</param>
 protected abstract void UpdateCalculations(JudgementInfo newJudgement);
Exemple #13
0
 protected void TriggerOnJudgement(JudgementInfo j)
 {
     OnJudgement?.Invoke(j);
     if (AllObjectsJudged)
         OnAllJudged?.Invoke();
 }