📅  最后修改于: 2022-03-11 14:48:43.309000             🧑  作者: Mango
float speed = whatever;
Vector2 positionToMoveTo = (whatever, whatever);
void Update()
{
transform.position = Vector2.MoveTowards(transform.position, positionToMoveTo, speed * Time.deltaTime);
}