38 lines
771 B
C#
38 lines
771 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class Pic : MonoBehaviour,IPointerClickHandler
|
|
{
|
|
public Transform cameraTarget;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
Cursor.visible = true;
|
|
Cursor.lockState = 0;
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
|
|
}
|
|
|
|
public void OnPointerClick(PointerEventData eventData)
|
|
{
|
|
|
|
Camera camera = Camera.main;
|
|
|
|
//Transform cameraTarget = GameObject.Find("8").transform;
|
|
|
|
cameraTarget.position = transform.position;
|
|
camera.transform.position = cameraTarget.position;
|
|
|
|
}
|
|
}
|