Beispiel #1
0
        public float JudgeScore(float deltaTime)
        {
            ArrowJudgement judgement = Judge(deltaTime);

            switch (judgement)
            {
            case ArrowJudgement.miss: m_Miss++; break;

            case ArrowJudgement.bad: m_Bad++; break;

            case ArrowJudgement.ok: m_Ok++; break;

            case ArrowJudgement.good: m_Good++; break;

            case ArrowJudgement.great: m_Great++; break;

            case ArrowJudgement.marvelous: m_Marvelous++; break;
            }

            m_Total++;

            float newScoreValue = Percentage = ((((m_Marvelous * 5f) + (m_Great * 4f) + (m_Good * 3f) + (m_Ok * 2f) + (m_Bad)) / 5f) / m_Total) * 100f;

            return(newScoreValue);
        }
Beispiel #2
0
 public void Reset()
 {
     m_Score         = 0;
     m_Combo         = 0;
     m_Acurracy      = 100;
     m_LastJudgement = ArrowJudgement.marvelous;
     m_LastDirection = ArrowDirection.none;
     judgement.Reset();
     ResetMilestones();
 }
Beispiel #3
0
    public void Evaluate(float delta, ArrowDirection direction)
    {
        m_LastJudgement = judgement.Judge(delta);
        m_Acurracy      = judgement.JudgeScore(delta);
        m_LastDirection = direction;

        HandleCombo();

        m_Score += ((int)m_LastJudgement * 100) * m_Combo;

        Notify();
    }
Beispiel #4
0
 private void Hit(ArrowJudgement judgement)
 {
     if (judgement == ArrowJudgement.miss)
     {
         return;
     }
     m_Animator.SetTrigger("Show");
     m_SpriteRenderer.color = ColorPalettes.Instance.Judgements.JudgementToColor(judgement);
     m_currentPartsys_1.Emit(1);// circles
     m_currentPartsys_2.Emit((int)judgement);
     for (int i = 0; i < CircleAroundObjects.Length; i++)
     {
         CircleAroundObjects[i].GetComponent <Animator>().SetTrigger("Show");
         CircleAroundObjects[i].GetComponent <SpriteRenderer>().color = ColorPalettes.Instance.Judgements.JudgementToColor(judgement);
     }
 }
Beispiel #5
0
        public Color JudgementToColor(ArrowJudgement judgement)
        {
            switch (judgement)
            {
            case ArrowJudgement.miss: return(Miss);

            case ArrowJudgement.bad: return(Bad);

            case ArrowJudgement.ok: return(Ok);

            case ArrowJudgement.good: return(Good);

            case ArrowJudgement.great: return(Great);

            case ArrowJudgement.marvelous: return(Marvelous);

            default: return(Color.black);
            }
        }
    public Sprite GetSprite(ArrowJudgement Judgement)
    {
        switch (Judgement)
        {
        case ArrowJudgement.miss: return(Miss);

        case ArrowJudgement.bad: return(Bad);

        case ArrowJudgement.ok: return(Ok);

        case ArrowJudgement.good: return(Good);

        case ArrowJudgement.great: return(Great);

        case ArrowJudgement.marvelous: return(Marvelous);

        default: return(null);
        }
    }
 public void RecieveJudgement(ArrowJudgement judgement)
 {
     GetComponent <SpriteRenderer>().sprite = m_sprites.GetSprite(judgement);
 }