How to say this in C# ?

Hey everyone, I’m having a hard time coding this but it seems like it should be simple. I want to say if theres no touch present ( if (Input.touchCount > 0)) than to accept ‘R’ as a reset for the game (if (Input.GetKeyDown (KeyCode.R)) . Can anyone help me with this? Thanks!

void Update ()

	{
		if (restart)
		
		{
				
				if (Input.touchCount > 0)

				//if (Input.GetKeyDown (KeyCode.R)

			
			{
				Application.LoadLevel (Application.loadedLevel);

			}
		}
	}

Use &&. It means “If the first statement is true, then evaluate the second one, if that’s true then run the body of the if statement”.
Also, use == (equals) instead of > (greater than) for touch count.

if (Input.touchCount == 0 && Input.GetKeyDown (KeyCode.R))
{
    Application.LoadLevel (Application.loadedLevel);
}
  • Ell