You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
823 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class ModelClickEvent : MonoBehaviour
{
public string ID;
[Header("ClickDownEvent")]
public UnityEvent ClickDownEvent;
private void Start()
{
ClickDownEvent.AddListener(SeletedSetCamera);
ClickDownEvent.AddListener(SetCameraView);
}
private void OnMouseDown()
{
Debug.Log("点击");
ClickDownEvent.Invoke();
}
private void SetCameraView()
{
this.GetComponent<CameraSet>().SetCameraView();
}
private void SeletedSetCamera()
{
CameraSet cameraSet = null;
cameraSet = this.GetComponent<CameraSet>();
GameManagerForZhuanWan.Instance.SetAciteveSheXiangTool(cameraSet);
}
}