mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/MI-38.git
synced 2026-01-24 01:05:37 +03:00
92 lines
3.3 KiB
C#
92 lines
3.3 KiB
C#
<<<<<<< HEAD
|
||
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);
|
||
}*/
|
||
}
|
||
=======
|
||
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);
|
||
}*/
|
||
}
|
||
>>>>>>> 3b1b9479a46e90d056b92897ea9f8422b25fc052
|