33 lines
883 B
C#
33 lines
883 B
C#
using System;
|
|
using Mirror;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Valheim
|
|
{
|
|
public class DuringPanel : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI LessTimeText;
|
|
public TextMeshProUGUI FPSText;
|
|
public TextMeshProUGUI PingText;
|
|
public Image PingIcon;
|
|
|
|
// private float m_UpdateShowDeltaTime = 0.5f;//更新帧率的时间间隔;
|
|
// private int m_FrameUpdate = 0;//帧数;
|
|
// private float m_FPS = 0;//帧率
|
|
|
|
public static void Show()
|
|
{
|
|
OverlayUIManager.Ins.Cover("UI/DuringPanel", false);
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
LessTimeText.text = GameManager.Ins.GetLessTimeStr();
|
|
PingText.text = Math.Round(NetworkTime.rtt * 1000) + "";
|
|
PingIcon.color = NetworkClient.connectionQuality.ColorCode();
|
|
}
|
|
}
|
|
}
|