NG_/Assets/Scripts/UI/全局/AgencyMove.cs

31 lines
702 B
C#
Raw Normal View History

2024-12-13 19:40:05 +08:00
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<CameraMove>().targetPosition = target;
agency.GetComponent<CameraMove>().targetRotation = target;
agency.GetComponent<CameraMove>().OnMouseDown();
}
}