📜  如何向对象统一移动 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:16.995000             🧑  作者: Mango

代码示例2
/// 
/// Move 2D sprite towards target
/// 
/// 
/// 
private void Move(Vector3 target, float movementSpeed)
{
    //Move
    transform.position += (target - transform.position).normalized * movementSpeed * Time.deltaTime;
}