网上演练贵港万达广场(人员密集)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

49 lines
1.5 KiB

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using AX.NetworkSystem;
public class KickOutImage : MonoBehaviour,IPointerEnterHandler {
public Button KickOutButton;
public Button LookOverInfoButton;
// Use this for initialization
void Start () {
KickOutButton = transform.Find("KickOutButton").GetComponent<Button>();
LookOverInfoButton = transform.Find("LookOverInfoButton").GetComponent<Button>();
KickOutButton.onClick.AddListener(kickOnClick);
LookOverInfoButton.onClick.AddListener(LookInfoClick);
}
private void LookInfoClick()
{
print("查看信息");
}
/// <summary>
/// 被踢出房间,返回大厅
/// </summary>
private void kickOnClick()
{
//ToDo:
//让该用户返回大厅
//EnterRoomPair enter = new EnterRoomPair {
// UserData = transform.parent.GetComponent<RoleItem>().userData,
// RoomId = CurrentUserInfo.room.Id,
// PassWord = ""
//};
NetworkManager.Default.SendAsync("KICK_SOMEONE_SYNC",
new KeyValuePair<long,long>(CurrentUserInfo.room.Id,transform.parent.GetComponent<RoleItem>().userData.UserInfo.Id));
}
// Update is called once per frame
void Update () {
}
public void OnPointerEnter(PointerEventData eventData)
{
this.gameObject.SetActive(true);
}
}