2025-07-21 05:42:20 -04:00
|
|
|
using System;
|
2025-06-03 02:42:28 -04:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2025-07-08 14:28:40 -04:00
|
|
|
using Ichni.UI;
|
2025-07-21 05:42:20 -04:00
|
|
|
using Sirenix.OdinInspector;
|
2025-06-03 02:42:28 -04:00
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
2025-07-08 14:28:40 -04:00
|
|
|
namespace Ichni.RhythmGame.UI
|
2025-06-03 02:42:28 -04:00
|
|
|
{
|
2025-07-08 14:28:40 -04:00
|
|
|
public class GameUICanvas : UIPageBase
|
2025-06-03 02:42:28 -04:00
|
|
|
{
|
|
|
|
|
public Button pauseButton;
|
2025-07-21 05:42:20 -04:00
|
|
|
|
|
|
|
|
public TMP_Text readyText;
|
2025-06-03 02:42:28 -04:00
|
|
|
public TMP_Text accuracyText;
|
|
|
|
|
public TMP_Text comboText;
|
|
|
|
|
|
2025-07-21 05:42:20 -04:00
|
|
|
public GamePauseInterface pauseInterface;
|
|
|
|
|
|
|
|
|
|
[Title("Debug")]
|
|
|
|
|
public TMP_Text fpsText;
|
|
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
|
|
|
|
pauseButton.onClick.AddListener(()=>
|
|
|
|
|
{
|
|
|
|
|
GameManager.instance.audioManager.songPlayer.PauseSong();
|
|
|
|
|
pauseInterface.FadeIn(0.5f, true);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
fpsText.text = (1.0f / Time.unscaledDeltaTime).ToString("F2");
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-03 02:42:28 -04:00
|
|
|
public void UpdateAccuracy(float accuracy)
|
|
|
|
|
{
|
|
|
|
|
accuracyText.text = accuracy.ToString("F2") + "%";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateCombo(int currentCombo)
|
|
|
|
|
{
|
|
|
|
|
comboText.text = currentCombo.ToString("D");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|