37 lines
908 B
C#
37 lines
908 B
C#
using System.Net;
|
|
using RenderStreaming;
|
|
using Stary.Evo;
|
|
using Stary.Evo.UIFarme;
|
|
using Unity.RenderStreaming;
|
|
using Unity.XR.XREAL;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class Main : MonoBehaviour, IController
|
|
{
|
|
private GameObject _canvasMain;
|
|
private bool _isTouchPad = false;
|
|
|
|
private void Start()
|
|
{
|
|
_canvasMain = GameObject.Find("CanvasMain");
|
|
this.GetSystem<IPanelSystem>().PushQueue<StartPanel>();
|
|
|
|
XREALVirtualController.Singleton.pointerDown += SingletonOnpointerDown;
|
|
|
|
|
|
}
|
|
|
|
void SingletonOnpointerDown(XREALButtonType arg1, GameObject arg2, PointerEventData arg3)
|
|
{
|
|
_isTouchPad = !_isTouchPad;
|
|
if (arg1 == XREALButtonType.CustomButton0)
|
|
{
|
|
_canvasMain.SetActive(_isTouchPad);
|
|
}
|
|
}
|
|
public IArchitecture GetArchitecture()
|
|
{
|
|
return MainArchitecture.Interface;
|
|
}
|
|
} |