12345678910111213141516171819202122232425262728293031323334 |
- using System.Collections;
- using System.Collections.Generic;
- using Unity.VisualScripting;
- using UnityEngine;
- using UnityEngine.UI;
- public class RoomToggleChoose : MonoBehaviour
- {
- public int id;
- private void OnEnable()
- {
- if(DataManager.admin!=1)
- {
- this.GetComponent<Button>().onClick=new Button.ButtonClickedEvent();
- }
- //index = this.GetComponentIndex();
- }
- public void choose(bool b)
- {
- if (b&& id!=0&&DataManager.admin==1)
- {
- ServerRoomManager.chooswsd = id;
- Debug.Log("chooswsd__" + ServerRoomManager.chooswsd);
- if (DianLiJianKongManager.Instance && DianLiJianKongManager.Instance.gameObject.activeSelf && id != 0)
- DianLiJianKongManager.Instance.chooseToggle(id);
- else if (ShiPingJianKongManager.Instance && ShiPingJianKongManager.Instance.gameObject.activeSelf && id != 0)
- ShiPingJianKongManager.Instance.chooseToggle(id);
- else
- {
- }
- }
- }
- }
|