title: Input Touchscreen for mobile
body: <p>I have four buttons at the bottom, notes would then fall from the top of the screen, I am not sure how to code the touchscreen part for mobile, I have it working for pc format, but I am not sure what I need to change for it to work.</p>
  
  <p>I have 2 scripts, one for the buttons and then one for every note falling down.</p>
  
  <p>This is what I have at the moment:
  For the buttons:</p>
  
  <pre><code>void Update()
      {
          if(Input.GetKeyDown(keyToPress))
          {
              theSR.sprite = pressedImage;
          }
  
          if(Input.GetKeyUp(keyToPress))
          {
              theSR.sprite = defaultImage;
          }
      }
  </code></pre>
  
  <p>For the Notes:
  void Update()</p>
  
  <pre><code> {
          if(Input.GetKeyDown(keyToPress))
          {
              if(canBePressed)
              {
                  gameObject.SetActive(false);
  
                  //GameManager.instance.NoteHit();
  
  
                  //Determine if player hits the note normal, good, perfect
                  if (Mathf.Abs(transform.position.y) &gt; 0.25)
                  {
                      GameManager.instance.NormalHit();
                      Instantiate(hitEffect, transform.position, hitEffect.transform.rotation);
                  }
                  else if (Mathf.Abs(transform.position.y) &gt; 0.05f)
                  {
                      GameManager.instance.GoodHit();
                      Instantiate(goodEffect, transform.position, goodEffect.transform.rotation);
  
                  }
                  else
                  {
                      GameManager.instance.PerfectHit();
                      Instantiate(perfectEffect, transform.position, perfectEffect.transform.rotation);
                  }
              }
          }
      }
  </code></pre>
  
  <p>This works perfectly if it was PC only but I just don't know what to change for it to buttons to react exactly the same way in mobile as it would on PC</p>