mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 02:25:38 +03:00
45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class Switch2view : MonoBehaviour, IPointerClickHandler//, IPointerEnterHandler, IPointerExitHandler
|
|
{
|
|
[HideInInspector] public Manager manager;
|
|
void Start()
|
|
{
|
|
manager = GameObject.Find("Manager").GetComponent<Manager>();
|
|
}
|
|
|
|
public void OnPointerClick(PointerEventData eventData)
|
|
{
|
|
/* manager.viewmode = 3; // Свободный обзор
|
|
//if(manager.mode == "free") manager.mode = "view";
|
|
//manager.mode = "view";
|
|
manager.cabines2d.SetActive(false);
|
|
manager.fusel.SetActive(true);
|
|
manager.skv.SetActive(true);
|
|
|
|
//manager.ViewBackButton.GetComponent<Button>().onClick.Invoke();
|
|
// Выключаем коллайдеры для внутренней и пассажирской кабины
|
|
manager.DisablePassCabineCollider();
|
|
manager.DisablePilotCabineCollider();
|
|
*/
|
|
if (manager == null)
|
|
manager = GameObject.Find("Manager").GetComponent<Manager>();
|
|
if (!manager.is3D) manager.SwitchTo3D();
|
|
manager.switchModeView();
|
|
|
|
manager.mouseEnterUI();
|
|
}
|
|
/*public void OnMouseDown()
|
|
{
|
|
manager.viewmode = 3; // Свободный обзор
|
|
//if (manager.mode == "free") manager.mode = "view";
|
|
manager.cabines2d.SetActive(false);
|
|
manager.fusel.SetActive(true);
|
|
manager.skv.SetActive(true);
|
|
}*/
|
|
}
|