网上演练
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.

36 lines
1.4 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WaitingTruckItem : MonoBehaviour {
public TruckMessage info;
public void Set(TruckMessage info)
{
this.info = info;
/*var userid = info.UserID;
UserData data = CurrentUserInfo.room.FindUserById(userid);
string dispName = data.Org.DisplayName;
string truckType = CloneObjTypeName.Instance.GetCloneNameByType(info.gameObjType);
string text = dispName + truckType;
GetComponent<Text>().text = text;*/
string truckName = info.FullName;
string amount = "";
if (info.MyCarMessage.WaterAmount != 0)
{
//amount += "(载水量:" + info.MyCarMessage.WaterAmount.ToString() + ")";
amount += "(可用水量:" +
(info.GetComponent<WaterSource>().TotalWater - info.GetComponent<WaterSource>().AllUserWater) +
" L)";
}
if(info.MyCarMessage.FoamAmount != 0)
{
//amount += "(载泡沫量:" + info.MyCarMessage.FoamAmount.ToString() + ")";
amount += "(可用泡沫量:" +
(info.GetComponent<WaterSource>().TotalFoam - info.GetComponent<WaterSource>().AllUserFoam) +
" L)";
}
GetComponent<Text>().text = truckName + amount;
}
}