A Simple Point System — If Statements

Al Heck
Apr 13, 2021

I built a simple point tally system. If you press the space bar, you add 10 points to your score. Only catch was the getkeydown vs getkey. Keydown checks if it’s pressed, but getkey (as long as space is held), will keep spamming on update. I also created a 10pt variable so those get added to the points variable, which is called on debug.log.

Super easy challenge.

--

--

Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ