Пример #1
0
 /// <summary>
 /// Detect accuracy of user input
 /// </summary>
 /// <param name="note">Note been checked</param>
 void detectAcc(GameObject note)
 {
     if (note.transform.position.x >= this.transform.position.x - 0.15 &&
         note.transform.position.x <= this.transform.position.x + 0.15)
     {
         removeNote(note);
         playCtrl.IncreasePerfect();
     }
     else if (note.transform.position.x >= this.transform.position.x - 0.35 &&
              note.transform.position.x <= this.transform.position.x + 0.35)
     {
         removeNote(note);
         playCtrl.IncreaseGood();
     }
     else
     {
         removeNote(note);
         playCtrl.IncreaseBad();
     }
 }