using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; // 代理移动 public class AgencyMove : MonoBehaviour,IPointerClickHandler { public GameObject agency; //代理商 public Transform target; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void OnPointerClick(PointerEventData eventData) { agency.GetComponent().targetPosition = target; agency.GetComponent().targetRotation = target; agency.GetComponent().OnMouseDown(); } }