22 lines
490 B
C#
22 lines
490 B
C#
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();
|
|
}
|
|
} |