22 lines
637 B
C#
22 lines
637 B
C#
using UnityEngine;
|
|
|
|
public class SpeedSetting : MonoBehaviour
|
|
{
|
|
public GUIStyle Normal;
|
|
|
|
public RealWaterSpeedManager speedManager;
|
|
|
|
private float native_width = 1920f;
|
|
|
|
private float native_height = 1080f;
|
|
|
|
private void OnGUI()
|
|
{
|
|
float x = (float)Screen.width / native_width;
|
|
float y = (float)Screen.height / native_height;
|
|
GUI.matrix = Matrix4x4.TRS(new Vector3(0f, 0f, 0f), Quaternion.identity, new Vector3(x, y, 1f));
|
|
GUI.Label(new Rect(57.6f, 453.59998f, 288f, 43.2f), "Speed: ", Normal);
|
|
speedManager.Speed = GUI.HorizontalSlider(new Rect(153.59999f, 462.24f, 288f, 32.399998f), speedManager.Speed, 0f, 100f);
|
|
}
|
|
}
|