| current | 当前值。 | 
| target | 要向其靠近的值。 | 
| maxDelta | 对值应用的最大变化。 | 
将值 current 向 target 靠近。
        这本质上与 Mathf.Lerp 相同,但是该函数确保速度不超过 maxDelta。
maxDelta 为负值时将值推离 /target/。
      
using UnityEngine;
public class Example : MonoBehaviour { float currStrength; float maxStrength; float recoveryRate;
void Update() { currStrength = Mathf.MoveTowards(currStrength, maxStrength, recoveryRate * Time.deltaTime); } }