Example #1
0
    internal void SetScore(Note.Mood mood, int score)
    {
        this.score[mood] = score;

        TextMeshProUGUI t = null;

        t = (mood == Note.Mood.A ? txtScoreA : mood == Note.Mood.B ? txtScoreB : mood == Note.Mood.C ? txtScoreC : null);
        if (t != null)
        {
            t.text = "[" + mood + "] " + this.score[mood] + "/" + required[mood];

            if (t == txtScoreA && SliderA != null)
            {
                SliderA.value = score;
            }
            else if (t == txtScoreB && SliderB != null)
            {
                SliderB.value = score;
            }
            else if (t == txtScoreC && SliderC != null)
            {
                SliderC.value = score;
            }
        }
        //SliderA.value = no;
        //SliderB.value = txtScoreB;
        // SliderC.value = txtScoreC;
    }
Example #2
0
    public int GetMoodValue(Note.Mood mood)
    {
        var foundIndex = moodChanges.FindIndex(r => r.mood == mood);

        if (foundIndex >= 0)
        {
            return(moodChanges[foundIndex].value);
        }
        return(-1);
    }
Example #3
0
    public void PlayCard(Card card)
    {
        hand.Remove(card);

        var note = GetNote(currentTime);

        if (note != null)
        {
            uiTimeline.HideLatestNode();
        }

        if (card is MoodCard)
        {
            var c = card as MoodCard;
            if (note != null)
            {
                ScoreMood(note, c);
                DrawCards(1);
            }
            BreakCombo();
        }

        if (card is ComboCard)
        {
            var c = card as ComboCard;
            if (note != null)
            {
                if (note.isComboNote)
                {
                    // check if starting notes contains any mood from the current note
                    comboMood = comboStartNote.GetFirstMatchingMood(note);

                    if (comboMood != Note.Mood.Blank)
                    {
                        PlayCombo(note, c);
                    }
                }
                DrawCards(1);
            }
        }

        if (card is DrawCard)
        {
            var c = card as DrawCard;

            if (note != null)
            {
                DrawCards(c.cardsToDraw);
            }
            BreakCombo();
        }

        uiHand.Setup(hand);
    }
Example #4
0
    internal void AnimateScore(Note.Mood mood, int value)
    {
        int moodMinusBlank = (int)mood - 1;

        Note.Mood moodSelcted = (Note.Mood)moodMinusBlank;

        animationDictonary[moodSelcted].Stop();
        animationDictonary[moodSelcted].Rewind();
        animationDictonary[moodSelcted].Play();

        moods[moodMinusBlank].SetColor(mood.ToString(), value);
    }
Example #5
0
    public void SetScore(Note.Mood mood, int score, int required)
    {
        this.required[mood] = required;

        SetScore(mood, score);
    }
Example #6
0
 List <MoodValue> GetMoodValues(Note note, Note.Mood mood)
 {
     return(moodValues.FindAll(r => r.mood == Note.Mood.Blank || note.moodScores.ContainsKey(r.mood)));
 }