I understand this: if(Input.GetKeyDown(KeyCode.Return)), but how to make this works, but only after pressing return 3 times ? I want to make different animations play on different press in a 2dcollider
if(Input.GetKeyDown(KeyCode.Return))
{
animator2.SetBool("PlayRun", true);
}
make a counter:
int myCounter = 0;
if(Input.GetKeyDown(Keycode.Return)){
myCounter++; //short for +1
}
if(myCounter == 3){
//your Code + reset
myCounter = 0;
}