标签: c# time unity3d void
using UnityEngine; using System.Collections; public class Pause : MonoBehaviour { bool paus; void wait() { if(paus == 0) { Time.timeScale == 0F; } if(paus == 1) { Time.timeScale == 1.0F; } paus= !paus;
答案 0 :(得分:2)
修复代码后,它可能如下所示:
if(paus) { Time.timeScale = 0F; } if(paus == 1) { Time.timeScale = 1.0F; } paus= !paus;