Project_WL/Assets/Script/zTemp/zSizeControler.cs

22 lines
490 B
C#
Raw Normal View History

2024-12-15 01:39:39 +00:00
using TMPro;
using UnityEngine;
public class zSizeControler : MonoBehaviour
{
public TextMeshProUGUI text_scale;
Transform tf_target;
public void Set(Transform tf)
{
tf_target = tf;
text_scale.text = tf_target.localScale.x.ToString();
}
public void OnClick_Arrow(float scale)
{
var s = tf_target.localScale.x + scale;
tf_target.localScale = Vector3.one * s;
text_scale.text = tf_target.localScale.x.ToString();
}
}