using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public enum InterfaceType { None, IN1, IN1_100K, IN2, IN2_200K, IN3, IN3_200K, IN4, 正12V,//+12V GND, GND1, GND2, GND3, 负12V,//-12V 正5V, 负5V, 零V, UI, UI_100K, UI_01uF, UI_1uF, UI_10uF, O1_01uF, O1_1uF, O1_10uF, OUT, OUT1, OUT2, O1, O2, _1uF_left, _1uF_right, _10uF_left, _10uF_right, _51K_star, _51K_end, _100K_star, _100K_end, _200K_star, _200K_end, _250K_star, _250K_end, 转换板, III, AD1, AD2, 插头, 开关, 闸 } public class LineConnect : MonoBehaviour { /// /// 唯一ID /// public int id; public InterfaceType interfaceType = InterfaceType.None; /// /// 是否是不需要连接的接口 /// public bool IsNotLine = false; /// /// 是否已经点击了该接口 /// public bool isClick = false; private void OnMouseDown() { if (!isClick && LineManager.instance.Addtime >= 2) { isClick = true; Debug.Log(transform.name); LineManager.instance.ClickPoint(transform); LineManager.instance.Addtime = 0; } } }