Quantcast
Channel: Latest Questions by RoboticSarcasm
Viewing all articles
Browse latest Browse all 40

Boolean only toggleable to one state [C#]

$
0
0
I may be going crazy, but aftera long while of trying stuff i can't manage to see how to fix it as i don't have the slightest clue why it happens. I can either only turn the boolean to true from false, or turn the boolean from false to true, depending on the location of the if-statements. I know it's probably the dumbest thing ever, but i really can't find it! if (Input.GetButton("Escape")) { if (escMenuOpen) { escMenuOpen = false; } if (!escMenuOpen) { escMenuOpen = true; } }

Viewing all articles
Browse latest Browse all 40

Trending Articles