58 lines
2.0 KiB
C#
58 lines
2.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Ichni.UI;
|
|
using Michsky.MUIP;
|
|
using Sirenix.OdinInspector;
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Ichni.RhythmGame.UI
|
|
{
|
|
public class SummaryPageCanvas : UIPageBase
|
|
{
|
|
[Title("Song Information")]
|
|
public TMP_Text songNameText;
|
|
public TMP_Text composerText;
|
|
public TMP_Text illustratorText;
|
|
public TMP_Text difficultyText;
|
|
public TMP_Text chartDesignerText;
|
|
|
|
[Title("Game Records")]
|
|
public TMP_Text perfectCountText;
|
|
public TMP_Text goodCountText;
|
|
public TMP_Text badCountText;
|
|
public TMP_Text missCountText;
|
|
public TMP_Text accuracyText;
|
|
public TMP_Text maxComboText;
|
|
|
|
[Title("Buttons")]
|
|
public Button restartButton;
|
|
public Button backButton;
|
|
|
|
public void SetUpSummary()
|
|
{
|
|
InformationTransistor info = InformationTransistor.instance;
|
|
|
|
songNameText.text = info.song.songName;
|
|
composerText.text = info.song.composer;
|
|
illustratorText.text = info.song.illustratorName;
|
|
difficultyText.text = info.difficulty.GetDifficultyName();
|
|
chartDesignerText.text = info.difficulty.charterName;
|
|
|
|
PlayingRecorder recorder = GameManager.instance.playingRecorder;
|
|
|
|
perfectCountText.text = recorder.perfectCount.ToString();
|
|
goodCountText.text = recorder.goodCount.ToString();
|
|
badCountText.text = recorder.badCount.ToString();
|
|
missCountText.text = recorder.missCount.ToString();
|
|
accuracyText.text = recorder.accuracy.ToString("F2") + "%";
|
|
maxComboText.text = recorder.maxCombo.ToString();
|
|
|
|
restartButton.onClick.RemoveAllListeners();
|
|
restartButton.onClick.AddListener(GameManager.RestartGame);
|
|
backButton.onClick.RemoveAllListeners();
|
|
backButton.onClick.AddListener(GameManager.ReturnToMenu);
|
|
}
|
|
}
|
|
} |