mergemilitary/Assets/Art_Military/AAsucai/ExplosiveLLC/SuperCharacterController/Code/PlayerMachineDebug.cs

27 lines
634 B
C#
Raw Permalink Normal View History

2022-05-18 13:44:19 +00:00
using UnityEngine;
public class PlayerMachineDebug : MonoBehaviour
{
[SerializeField]
private PlayerMachine playerMachine;
private float timeScale = 1.0f;
void Awake()
{
if(playerMachine == null)
{
playerMachine = GetComponent<PlayerMachine>();
}
}
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;
}
}