| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class InfraredGuider : MonoBehaviour
- {
- public GameObject infraredLightGuider;
- public GameObject infraredResulutionGuider;
- public Button resulutionButton;
- public GameObject Title1ARTEMISPro;
- public GameObject Title1;
- public GameObject Title2;
- //相机感光部分
- [SerializeField]
- Slider slider;
- // Start is called before the first frame update
- void Start()
- {
- if (InfraredDemo._ins)
- {
- slider.onValueChanged.AddListener((value) =>
- {
- InfraredDemo._ins.onSliderEvent(value, "PU_BRIGHTNESS");
- });
- InfraredDemo._ins.onSetSliderValue(slider, "PU_BRIGHTNESS");
- }
- #if UNITY_STANDALONE_WIN || UNITY_EDITOR
- resulutionButton.gameObject.SetActive(false);
- #endif
- //枪暂时不显示
- if (BluetoothAim.ins.isMainConnectToGun()) {
- Title1ARTEMISPro.SetActive(false);
- Title1.SetActive(false);
- }
- else
- //切换ARTEMISPro
- if (BluetoothAim.ins.isMainConnectToARTEMISPRO()) {
- Title1ARTEMISPro.SetActive(true);
- Title1.SetActive(false);
- }
- }
- // Update is called once per frame
- //void Update()
- //{
- //}
- public void enterLightView() {
- Instantiate(infraredLightGuider);
- }
- public void enterInfraredResulutionGuider() {
- #if UNITY_ANDROID
- Instantiate(infraredResulutionGuider);
- #endif
- }
- public void ExitGuider() {
- //if (NewUserGuiderManager.ins)
- // NewUserGuiderManager.ins.OnEnd();
- GameAssistUI.ins.onBtnBack();
- //GameMgr.bNavBack = false;
- //Destroy(gameObject);
- }
- /// <summary>
- /// 校准后切换标题
- /// </summary>
- public void SetTitleAfterCalibration() {
- Title1ARTEMISPro.SetActive(false);
- Title1.SetActive(false);
- Title2.SetActive(true) ;
- }
- }
|