我是一个非常菜鸟程序员,试图为我的游戏制作一个简单的暂停菜单。我不断收到此错误:
错误3 只有assignment、call、increment、decrement、await和new对象表达式可以作为语句使用
这是我的代码:
using UnityEngine;
using System.Collections;
public class pause : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKey("escape") && Time.timeScale == 1)
{
Time.timeScale == 0;
}
}
}