-
-
Save Gojeflone/9043678 to your computer and use it in GitHub Desktop.
If Statements and boo leans in Unity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myCheck : boolean = true; | |
function Update () { | |
if(myCheck){ | |
guiText.text = "Its on!"; | |
}else{ | |
guiText.text = "Its Off!"; | |
} | |
if(Input.GetButtonUp("Jump") && myCheck){ | |
myCheck = false; | |
}else if(Input.GetButtonUp("Jump") && myCheck == false){ | |
myCheck = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment