I am trying to count how many times the user has pressed a certain key on the keyboard.
Something like the code below, except of course the code below increments count by number of frames key 1 was held down.
How can just get the count of that key 1 press? I could add a boolean to keep track of the key pressed/released, but I can't find in the docs how i can get those keyboard events.
var count = 0;
function Update()
{
if(Input.GetKey("1"))
{
count++;
}
}