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;*/ string truckName = info.FullName; string amount = ""; if (info.MyCarMessage.WaterAmount != 0) { //amount += "(载水量:" + info.MyCarMessage.WaterAmount.ToString() + ")"; amount += "(可用水量:" + (info.GetComponent().TotalWater - info.GetComponent().AllUserWater) + " L)"; } if(info.MyCarMessage.FoamAmount != 0) { //amount += "(载泡沫量:" + info.MyCarMessage.FoamAmount.ToString() + ")"; amount += "(可用泡沫量:" + (info.GetComponent().TotalFoam - info.GetComponent().AllUserFoam) + " L)"; } GetComponent().text = truckName + amount; } }