idk
This commit is contained in:
Noah4ever
2021-11-12 08:23:51 +01:00
parent 6e13025624
commit dd4da20ec3
10 changed files with 1725 additions and 463 deletions

View File

@@ -8,6 +8,7 @@ using Mirror;
public class DebugCanvas : MonoBehaviour
{
public TextMeshProUGUI DebugTextGrounded;
public TextMeshProUGUI DebugTextAmmunition;
public TextMeshProUGUI DebugTextClientServer;
public GameObject Player;
public GameObject GameManager;
@@ -17,6 +18,7 @@ public class DebugCanvas : MonoBehaviour
private void Start()
{
GameManager = GameObject.Find("GameManager");
}
private void Update()
{
@@ -36,10 +38,12 @@ public class DebugCanvas : MonoBehaviour
{
DebugTextGrounded.text = "isGrounded: " + Player.GetComponent<PlayerController>().isGrounded.ToString();
DebugTextAmmunition.text = Player.GetComponent<Shoot>().CurAmmo.ToString() + " / " + Player.GetComponent<Shoot>().TotalAmmo.ToString();
deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
float fps = 1.0f / deltaTime;
fpsText.text = Mathf.Ceil(fps).ToString() + "FPS";
}
}
}