Question by
spirospica · May 29, 2017 at 01:51 PM ·
getkeydowninput.getkey
How can I get inputs in several steps?
I'd like to make application to ask once again before closing the application. So I use if statement to go int and used another if statement to check again. However, when I make like this, it directly goes in to second if statement and just closes application. Is there any way to make this work?
if (Input.GetKeyDown(KeyCode.Escape))
{
levelImage.SetActive(true);
saveText = levelText;
levelText.text = "Press Back Key Again to End the Game";
if(Input.GetKeyDown(KeyCode.Escape))
{
levelText.text = "Good Bye!";
Invoke("Ends", levelStartDelay);
}
}
Comment
Your answer