📜  togl unity - C# 代码示例

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

代码示例1
private bool togl;//this is either true or false

        if (Input.GetKey(KeyCode.A)) //can have whatever statment you want here
        {                             
            togl = !togl; //this is what changes the bool
        }