Files
Simulation/Assets/Scripts/UI/TransformToolbarScript.cs
2025-07-31 16:08:23 +09:00

31 lines
854 B
C#

using UnityEngine;
using Octopus.Simulator;
using UnityEngine.UI;
public class TransformToolbarScript : MonoBehaviour
{
Button Button_Hand;
Button Button_Move;
Button Button_Rotate;
private void Awake()
{
Button_Hand = transform.Find(nameof(Button_Hand)).GetComponent<Button>();
Button_Move = transform.Find(nameof(Button_Move)).GetComponent<Button>();
Button_Rotate = transform.Find(nameof(Button_Rotate)).GetComponent<Button>();
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
FindAnyObjectByType<Panel_SimulationUI>().onPlaying += OnPlay;
}
void OnPlay(bool flag)
{
Button_Hand.interactable = false;
Button_Move.interactable = false;
Button_Rotate.interactable = false;
}
}