76 lines
1.9 KiB
C#
76 lines
1.9 KiB
C#
using AdamSync;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Conversionfrequency : MonoBehaviour
|
|
{
|
|
public static Conversionfrequency Instance;
|
|
|
|
public TerrestrialRadioInterferenceManger terrestrialRadioInterferenceManger;
|
|
|
|
/// <summary>
|
|
/// 改变频率的传值
|
|
/// </summary>
|
|
public int Smallfrequency;
|
|
/// <summary>
|
|
/// 取消频率设置按钮
|
|
/// </summary>
|
|
public Button offon_buttn;
|
|
|
|
/// <summary>
|
|
/// 调整场景内无线电干扰的频率
|
|
/// </summary>
|
|
public string disturb;
|
|
/// <summary>
|
|
/// 选择干扰频率
|
|
/// </summary>
|
|
public Toggle toggle1, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7;
|
|
private void Awake()
|
|
{
|
|
Instance = this;
|
|
}
|
|
void Start()
|
|
{
|
|
transform.gameObject.SetActive(false);
|
|
Controlpage();
|
|
Ganran();
|
|
}
|
|
|
|
private void Ganran()
|
|
{
|
|
|
|
}
|
|
|
|
private void Controlpage()
|
|
{
|
|
offon_buttn.onClick.AddListener(() =>
|
|
{
|
|
transform.gameObject.SetActive(false);
|
|
});
|
|
//verify_buttn.onClick.AddListener(() =>
|
|
//{
|
|
// //Smallfrequency = dropdown.value;
|
|
// terrestrialRadioInterferenceManger.InterferingFrequency= dropdown.options[dropdown.value].text;
|
|
// Debug.LogError(terrestrialRadioInterferenceManger.InterferingFrequency);
|
|
// //terrestrialRadioInterferenceManger.Interference(Smallfrequency);
|
|
// transform.gameObject.SetActive(false);
|
|
// string msg = $"send2room EditorDevice,{terrestrialRadioInterferenceManger.equipmentCommon.deviceID},{terrestrialRadioInterferenceManger.InterferingFrequency}";
|
|
// _ = SyncCreateRoom.SendMessageAsync(msg);
|
|
//});
|
|
}
|
|
|
|
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
private void OnDestroy()
|
|
{
|
|
transform.gameObject.SetActive(false);
|
|
}
|
|
}
|