public void Input(int laneNum)
    {
        GameObject obj  = notesParent.GetObj(laneNum);
        float      diff = Mathf.Abs(obj.GetComponent <NoteData>().timing - moveManager.GetTime());

        if (diff <= judgewidth[0])
        {
            //P
            AddScore(Judge.Perfect);
            notesParent.SetObj(laneNum);
            moveManager.PlayClap();
        }
        else if (diff <= judgewidth[1])
        {
            //Gr
            AddScore(Judge.Great);
            notesParent.SetObj(laneNum);
            moveManager.PlayClap();
        }
        else if (diff <= judgewidth[2])
        {
            //Go
            AddScore(Judge.Good);
            notesParent.SetObj(laneNum);
            moveManager.PlayClap();
        }
        else if (diff <= judgewidth[3])
        {
            //B
            AddScore(Judge.Miss);
            notesParent.SetObj(laneNum);
            moveManager.PlayClap();
        }
    }
Beispiel #2
0
 public void Auto()
 {
     for (int i = 0; i < activeObjs.Length; i++)
     {
         if (activeObjs[i] != null && activeObjs[i].GetComponent <NoteData>().timing <= moveManager.GetTime())
         {
             Destroy(activeObjs[i]);
             if (noteObjs[i].Count != 0)
             {
                 activeObjs[i] = noteObjs[i].Dequeue();
             }
             moveManager.PlayClap();
         }
     }
 }