I'm making a game where i need to toggle a value, when player presses space bar value changes to 0 and when he again presses the value the value changes to 1, how to implement that please help!!!
hey thanks for the logic but i figured that my values are only 90 and 270, i've to toggle gravity to 90 or 270 when the space bar is hit. can you help me with code where space bar is hit and gravity toggles with 90 or 270?