Projext/Assets/Animation_human/SuperCharacterController/Code/PlayerMachineDebug.cs

24 lines
576 B
C#
Raw Normal View History

2026-02-19 18:14:55 +00:00
using UnityEngine;
public class PlayerMachineDebug:MonoBehaviour
{
[SerializeField]
private PlayerMachine playerMachine;
private float timeScale = 1.0f;
private void Awake()
{
if (playerMachine == null) { playerMachine = GetComponent<PlayerMachine>(); }
}
private void OnGUI()
{
GUI.Box(new Rect(10, 10, 200, 100), "Player Machine");
GUI.TextField(new Rect(20, 40, 180, 20), string.Format("State: {0}", playerMachine.currentState));
timeScale = GUI.HorizontalSlider(new Rect(20, 70, 180, 20), timeScale, 0.0f, 1.0f);
Time.timeScale = timeScale;
}
}