A Simple Point System — If Statements

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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ