Пример #1
0
 public void SetData(NoteInfo info)
 {
     this.info          = info;
     initPos            = GameManager.Instance.Data.BTN_POS [(int)info.Pos];
     transform.position = initPos + GameManager.Instance.Data.MOVE_DIRECTION * GameManager.Instance.Data.SPEED * (info.Time - GameManager.Instance.MusicTime);
     result             = EHitJudge.MISS;
     InitData( );
 }
Пример #2
0
 void CountPoint(EHitJudge result)
 {
     score += GameManager.Instance.Data.JUDGE_POINT [(int)result];
     if (result == EHitJudge.PERFECT || result == EHitJudge.GREAT)
     {
         bComboing = true;
         combo++;
     }
     else
     {
         bComboing = false;
         combo     = 0;
     }
 }
Пример #3
0
 /// <summary>call this method to ask note get the judge</summary>
 public virtual void Judge(Touch touch)
 {
     #region CLICK_NOTE
     //The currently time is in the range for click note judge
     //Will judge the score and return it
     if (GameManager.Instance.MusicTime <= maxTime && GameManager.Instance.MusicTime >= minTime)
     {
         if (touch.phase == TouchPhase.Began && touch.deltaTime != 0)
         {
             result = TimeJudge(Mathf.Abs(GameManager.Instance.MusicTime - Info.Time));
             if (result != EHitJudge.NONE)
             {
                 Recycle( );
             }
         }
     }
     #endregion CLICK_NOTE
 }
Пример #4
0
 void RecycleNote(Note note, EHitJudge result)
 {
     note.OnRecycle -= RecycleNote;
     detectNotes [(int)note.Info.Pos] = null;
     CountPoint(result);
 }