|
|
|
@ -18,18 +18,23 @@ public class WaitingTruckItem : MonoBehaviour {
|
|
|
|
|
string amount = ""; |
|
|
|
|
if (info.MyCarMessage.WaterAmount != 0) |
|
|
|
|
{ |
|
|
|
|
//amount += "(载水量:" + info.MyCarMessage.WaterAmount.ToString() + ")"; |
|
|
|
|
amount += "(可用水量:" + |
|
|
|
|
(info.GetComponent<WaterSource>().TotalWater - info.GetComponent<WaterSource>().AllUserWater) + |
|
|
|
|
" L)"; |
|
|
|
|
|
|
|
|
|
if (info.GetComponent<WaterSource>()) |
|
|
|
|
{ |
|
|
|
|
//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)"; |
|
|
|
|
if (info.GetComponent<WaterSource>()) |
|
|
|
|
{ |
|
|
|
|
//amount += "(载泡沫量:" + info.MyCarMessage.FoamAmount.ToString() + ")"; |
|
|
|
|
amount += "(可用泡沫量:" + |
|
|
|
|
(info.GetComponent<WaterSource>().TotalFoam - info.GetComponent<WaterSource>().AllUserFoam) + |
|
|
|
|
" L)"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
GetComponent<Text>().text = truckName + amount; |
|
|
|
|
} |
|
|
|
|