|
|
|
@ -742,13 +742,17 @@ public class FireManControl : MonoBehaviour
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
float realewater = 0;//实际分到的水量=自己的流量/直接水源的总流量*直接水源总水量 |
|
|
|
|
float dirTotalFlow = waterhosemanage.ConnentSource.GetComponent<WaterSource>().TotalFlow; |
|
|
|
|
realewater = (Flow / dirTotalFlow) * remainwater; |
|
|
|
|
if (Flow != 0) |
|
|
|
|
remaintime = Mathf.CeilToInt(realewater / Flow); |
|
|
|
|
else |
|
|
|
|
remaintime = 0; |
|
|
|
|
if (waterhosemanage.ConnentSource) |
|
|
|
|
{ |
|
|
|
|
float realewater = 0;//实际分到的水量=自己的流量/直接水源的总流量*直接水源总水量 |
|
|
|
|
float dirTotalFlow = waterhosemanage.ConnentSource.GetComponent<WaterSource>().TotalFlow; |
|
|
|
|
realewater = (Flow / dirTotalFlow) * remainwater; |
|
|
|
|
if (Flow != 0) |
|
|
|
|
remaintime = Mathf.CeilToInt(realewater / Flow); |
|
|
|
|
else |
|
|
|
|
remaintime = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
remain = new KeyValuePair<int, float>(remaintime, remainwater); |
|
|
|
|
|
|
|
|
|