|
|
|
@ -140,6 +140,10 @@ public class FireRobotLayWaterHose : MonoBehaviour
|
|
|
|
|
// Update is called once per frame |
|
|
|
|
void Update() |
|
|
|
|
{ |
|
|
|
|
if (remainlenght<=0.5f) |
|
|
|
|
{ |
|
|
|
|
agent.SetDestination(transform.position); |
|
|
|
|
} |
|
|
|
|
if (flag && agent.velocity.magnitude > 0) //开启“铺设水带”,并且开始寻路时才会执行 |
|
|
|
|
{ |
|
|
|
|
HasUseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20); |
|
|
|
|