using System;
using System.Collections.Generic;
using System.Linq;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
///
/// The JustSign-variant of the ScoreBoard
///
public class JustSignGameEndedPanel : AbstractGameEndedPanel
{
///
/// Tell the scoreboard that the scoreboard is for JustSign
///
protected override MinigameIndex minigameIndex
{
get { return MinigameIndex.JUST_SIGN; }
}
///
/// The field that will display the amount of perfect signs
///
public TMP_Text perfectSignsText;
///
/// The field that will display the amount of good signs
///
public TMP_Text goodSignsText;
///
/// The field that will display the amount of meh signs
///
public TMP_Text mehSignsText;
///
/// The field that will display the amount of terrible signs
///
public TMP_Text terribleSignsText;
///
/// The field that will display the amount of not found signs
///
public TMP_Text notFoundSignsText;
///
/// The field that will display the signs per minute
///
public TMP_Text gpmText;
///
/// Score
///
public TMP_Text scoreText;
///
/// Generate the content of the gameEnded panel
///
/// The amount of perfect signs
/// The amount of good signs
/// The amount of meh signs
/// The emount of terrible signs
/// The amount of incorrect signs
/// The duration of the song that was played
/// The score obtained by the player
public void GenerateContent(int perfectSigns, int goodSigns, int mehSigns, int terribleSigns, int incorrectSigns, int duration, int score)
{
// In de zone
perfectSignsText.text = perfectSigns.ToString();
// Aanvaardbaar
goodSignsText.text = goodSigns.ToString();
// Nipt
mehSignsText.text = mehSigns.ToString();
// Slechte timing
terribleSignsText.text = terribleSigns.ToString();
// Niet Geraden
notFoundSignsText.text = incorrectSigns.ToString();
// LPM
int correctSigns = goodSigns + perfectSigns + mehSigns + terribleSigns;
gpmText.text = (60f * correctSigns / duration).ToString("#") + " GPM";
// Score
scoreText.text = $"Score: {score}";
SetScoreBoard();
}
}