123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using Newtonsoft.Json;
- using SC.XR.Unity;
- using System.Collections.Generic;
- using UnityEngine;
- using static ScenesManager;
- public class RemoteSystem : RemoteSingleton<RemoteSystem>
- {
- public GameObject audioOpen;
- public GameObject audioClose;
- public GameObject videoOpen;
- public GameObject videoClose;
- public NormalList sysList;
- public override void initShow()
- {
- base.initShow();
- sysList.initList(CustomInfo.sscList);
- audioOpen.SetActive(!CustomInfo.isSendAudio);
- audioClose.SetActive(CustomInfo.isSendAudio);
- videoOpen.SetActive(!CustomInfo.isSendVideo);
- videoClose.SetActive(CustomInfo.isSendVideo);
- }
- public void showOffice()
- {
- NetWorkHeaders.SetUserSys(CustomInfo.isSendAudio, CustomInfo.isSendVideo, CustomInfo.camIndex);
- ScenesManager.Instance.showOffice(SceneType.OfficeWindow);
- }
- public void audioChoose()
- {
- CustomInfo.isSendAudio = !CustomInfo.isSendAudio;
- audioOpen.SetActive(!CustomInfo.isSendAudio);
- audioClose.SetActive(CustomInfo.isSendAudio);
- SaveSystemData();
- }
- public void videoChoose()
- {
- CustomInfo.isSendVideo = !CustomInfo.isSendVideo;
- videoOpen.SetActive(!CustomInfo.isSendVideo);
- videoClose.SetActive(CustomInfo.isSendVideo);
- SaveSystemData();
- }
- private void SaveSystemData()
- {
- SystemDatas data = new SystemDatas();
- data.Camera = CustomInfo.isSendVideo ? 1 : 0;
- data.Mic = CustomInfo.isSendAudio ? 1 : 0;
- string saveData = JsonConvert.SerializeObject(data);
- Debug.Log(saveData);
- PlayerPrefs.SetString(UserInfo.Account + "_SystemSetting", saveData);
- }
- }
|