📜  unity respawn - C# 代码示例

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

代码示例2
using UnityEngine;
 using System.Collections;
 
 public class respawn : MonoBehaviour {
     public float threshold;
 
     void FixedUpdate () {
         if (transform.position.y < threshold)
             transform.position = new Vector3(0, 0, 0);
     }
 }