12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class PopConfirmChange : PopBase {
- [SerializeField]
- private Game3DButton CancelBtn;
- [SerializeField]
- private Game3DButton OkBtn;
- [SerializeField]
- private TextMesh MText;
- private string format_str = "";
- protected override void Start () {
- base.Start();
- CancelBtn.onClick.AddListener(QuitClick);
- OkBtn.onClick.AddListener(OkClick);
- }
- //框体类型
- public override PopType MType { get { return PopType.ChangeMaster; } }
- protected override void OnDestroy()
- {
- base.OnDestroy();
- CancelBtn.onClick.RemoveListener(QuitClick);
- OkBtn.onClick.RemoveListener(OkClick);
- }
- private UserData user_data;
- public override void Show(System.Object data)
- {
- base.Show(data);
- user_data = data as UserData;
- }
- private void QuitClick()
- {
- this.Hide();
- }
- private void OkClick()
- {
- this.Hide();
- //先判断是不是房主
- var check = GamePlayerData.Instance.room_data.IsReconnectOwner();
- MessageCenterController.Instance.Broadcast(GameEnum.MESSAGE_SEND_CHANGE_MASTER_SOCKET_DATA, user_data);
- }
- }
|