using System.Collections; using System.Collections.Generic; using UnityEngine; public class CheckDarg : MonoBehaviour { public SheBeiType ChaKongType; //是否已有拖拽入物件 public DragItemH dragItem = null; public bool isEmpty = true; [HideInInspector] public Vector3 ChaKongPos; public void ResetItem() { if (dragItem == null) return; dragItem.ResetPos(); dragItem = null; isEmpty = true; //更新已插入设备数据 GameManager.Instance.SendItemData(); } private void Update() { this.GetComponent().position = Camera.main.WorldToScreenPoint(ChaKongPos); } }