Exemplo n.º 1
0
 public virtual void Tap()
 {
     print("Tapped: " + gameObject.tag);
     selectedState   = TouchManager.SelectedState.Tap;
     holdTimer       =
         holdFloored = 0;
 }
Exemplo n.º 2
0
 public virtual void Release()
 {
     print("Released: " + gameObject.tag);
     selectedState   = TouchManager.SelectedState.Release;
     holdTimer       =
         holdFloored = 0;
     StartCoroutine(ReleaseDelay());
 }
Exemplo n.º 3
0
 public virtual void Hold()
 {
     selectedState = TouchManager.SelectedState.Hold;
     if (holdFloored < Mathf.FloorToInt(holdTimer))
     {
         holdFloored = Mathf.FloorToInt(holdTimer);
         print("Held: " + gameObject.tag + " for " + holdFloored + " seconds");
     }
     holdTimer += Time.deltaTime;
 }
Exemplo n.º 4
0
        IEnumerator ReleaseDelay()
        {
            yield return(new WaitForEndOfFrame());

            selectedState = TouchManager.SelectedState.None;
        }