Web_Rot/Assets/Scripts/Canvas_UI.cs
2026-04-08 11:44:20 +08:00

35 lines
702 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Canvas_UI : MonoBehaviour
{
[SerializeField]
Button XuanZhuan_Btn;
[SerializeField]
Button ChongZhi_Btn;
[SerializeField]
ModelRot modelRot;
// Start is called before the first frame update
void Start()
{
XuanZhuan_Btn.onClick.AddListener(() =>
{
modelRot.isRot = !modelRot.isRot;
});
ChongZhi_Btn.onClick.AddListener(() =>
{
modelRot.isRot = false;
modelRot.ChongZhi_BtnCallBack();
});
}
// Update is called once per frame
void Update()
{
}
}