网上演练贵港万达广场(人员密集)
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.
 
 
 

34 lines
950 B

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PowerItemToggle : BaseToggle
{
public GameObject TargetGameObj;
public Text label;
//public bool HasAllot;
public long OwnerUserId;
public override void RespondFun(bool value)
{
//如果本客户端没有该力量的所有权
if (OwnerUserId != CurrentUserInfo.mySelf.Id)
{
return;
}
if (value)
AllotButton.SelectToAllot.Add(TargetGameObj);
else
AllotButton.SelectToAllot.Remove(TargetGameObj);
}
public void Set(GameObject tar)
{
TargetGameObj = tar;
CloneGameObjInfo info = TargetGameObj.GetComponent<CloneGameObjInfo>();
OwnerUserId = info.UserID;
label = transform.Find("Label").GetComponent<Text>();
label.text = info.FullName;
}
}