using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class InfraredGuidanceView : JCUnityLib.ViewBase { [SerializeField] GameObject layout1; [SerializeField] GameObject layout2; // Start is called before the first frame update void Start() { #if UNITY_STANDALONE_WIN || UNITY_EDITOR RectTransform rect = layout1.transform as RectTransform; rect.localPosition = new Vector3(0, -100, 0); layout1.GetComponent().spacing = 30; RectTransform rect2 = layout2.transform as RectTransform; rect2.localPosition = new Vector3(0, -115, 0); layout2.GetComponent().spacing = 30; #endif } public void OnClick_EnterLayout2() { //进入标定的页面 AudioMgr.ins.PlayBtn(); layout1.SetActive(false); layout2.SetActive(true); } public void OnClick_EnterScreenPositioningView() { //进入标定的页面 AudioMgr.ins.PlayBtn(); ViewManager2.HideView(ViewManager2.Path_InfraredView); ViewManager2.ShowView(ViewManager2.Path_InfraredScreenPositioningView); } public void OnClick_Back() { AudioMgr.ins.PlayBtn(); if (!layout1.activeSelf) { layout1.SetActive(true); layout2.SetActive(false); } else { ViewManager2.HideView(ViewManager2.Path_InfraredView); } } }