using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; using UnityEngine.UI; public class figurestate : MonoBehaviour { public bool isAI; public delegate void FigureStateChanged(bool newState, figurestate sender); public static event FigureStateChanged OnFigureStateChanged; private Button button; // 按钮组件 private GameObject image; void Start() { // 获取当前挂载物体的 Button 组件 button = GetComponent