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.
55 lines
1.7 KiB
55 lines
1.7 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Cinemachine;
|
|
public class DP : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
//public GameObject camera;
|
|
public GameObject worldcanvas;
|
|
public GameObject[] points;
|
|
public GameObject point;
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
foreach (GameObject obj in points) {
|
|
obj.SetActive(true);
|
|
}
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
//if (Input.GetKeyDown(KeyCode.Escape) && camera.active) {
|
|
// camera.GetComponent<CinemachineFreeLook>().LookAt = point.transform;
|
|
// camera.GetComponent<CinemachineFreeLook>().Follow = point.transform;
|
|
// camera.GetComponent<CinemachineFreeLook>().m_Orbits[0].m_Radius = 15.8f;
|
|
// camera.GetComponent<CinemachineFreeLook>().m_Orbits[1].m_Radius = 15.8f;
|
|
// camera.GetComponent<CinemachineFreeLook>().m_Orbits[2].m_Radius = 15.8f;
|
|
//}
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
foreach (GameObject obj in points)
|
|
{
|
|
if (obj) {
|
|
obj.SetActive(false);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
//public void changeLookAt(GameObject obj) {
|
|
// camera.GetComponent<CinemachineFreeLook>().LookAt = obj.transform;
|
|
// camera.GetComponent<CinemachineFreeLook>().Follow = obj.transform;
|
|
// camera.GetComponent<CinemachineFreeLook>().m_Orbits[0].m_Radius = 8;
|
|
// camera.GetComponent<CinemachineFreeLook>().m_Orbits[1].m_Radius = 8;
|
|
// camera.GetComponent<CinemachineFreeLook>().m_Orbits[2].m_Radius = 8;
|
|
//}
|
|
}
|