Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Pause Menu Not Going Away

$
0
0
Script problem again. Tried for almost a week on figuring this out. The script I have for the Pause Menu does everything it needs to do except for close the Pause Menu after I press escape again. Here it is: #pragma strict var Canvas : GameObject; function Update () { if(Input.GetKeyDown("escape")){ Canvas.SetActive(true); Cursor.visible = true; if(Time.timeScale == 1.0) Time.timeScale = 0.0; } else if (Canvas.SetActive == true) Cursor.visible = true; if(Time.timeScale == 0.0) { if(Input.GetKeyDown("escape")){ Canvas.SetActive(false); Cursor.visible = false; if(Time.timeScale == 0.0) Time.timeScale = 1.0; } } }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>