Ejemplo n.º 1
0
 public override HitResult hit(KeyCode aKey, HitNoteType aType)
 {
     if (mHitted)
     {
         return(HitResult.miss);        //hit済み
     }
     if (KeyMonitor.convertToCode(mVowel) != aKey)
     {
         return(HitResult.miss);//タイプミス
     }
     mHitted = true;
     hitted(this, aType);
     return(HitResult.consonant);
 }
Ejemplo n.º 2
0
 public override HitResult hit(KeyCode aKey, HitNoteType aType)
 {
     //子音hit判定
     if (!mHittedConsonant)
     {
         if (KeyMonitor.convertToCode(mConsonant) == aKey)
         {
             mHittedConsonant = true;
             hitted(findChild <MyBehaviour>("consonant"), aType);
             return(HitResult.consonant);
         }
     }
     //母音hit判定
     if (!mHittedVowel)
     {
         if (KeyMonitor.convertToCode(mVowel) == aKey)
         {
             mHittedVowel = true;
             hitted(findChild <MyBehaviour>("vowel"), aType);
             return(HitResult.vowel);
         }
     }
     return(HitResult.miss);
 }