RoomToggleChoose.cs 844 B

12345678910111213141516171819202122232425262728
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class RoomToggleChoose : MonoBehaviour
  5. {
  6. public int id;
  7. private void OnEnable()
  8. {
  9. //index = this.GetComponentIndex();
  10. }
  11. public void choose(bool b)
  12. {
  13. if (b&& id!=0)
  14. {
  15. ServerRoomManager.chooswsd = id;
  16. Debug.Log("chooswsd__" + ServerRoomManager.chooswsd);
  17. if (DianLiJianKongManager.Instance && DianLiJianKongManager.Instance.gameObject.activeSelf && id != 0)
  18. DianLiJianKongManager.Instance.chooseToggle(id);
  19. else if (ShiPingJianKongManager.Instance && ShiPingJianKongManager.Instance.gameObject.activeSelf && id != 0)
  20. ShiPingJianKongManager.Instance.chooseToggle(id);
  21. else
  22. {
  23. }
  24. }
  25. }
  26. }