예제 #1
0
    public override HitResult hit(KeyCode aKey, HitNoteType aType)
    {
        HitResult tResult = HitResult.miss;

        //子音hit判定
        if (!mHittedConsonant)
        {
            mHittedConsonant = true;
            hitted(findChild <MyBehaviour>("consonant"), aType);
            tResult = HitResult.consonant;
        }
        //母音hit判定
        if (!mHittedVowel)
        {
            mHittedVowel = true;
            hitted(findChild <MyBehaviour>("vowel"), aType);
            if (tResult == HitResult.consonant)
            {
                tResult = HitResult.consonantAndVowel;
            }
            else
            {
                tResult = HitResult.vowel;
            }
        }
        return(tResult);
    }
예제 #2
0
 public override HitResult hit(KeyCode aKey, HitNoteType aType)
 {
     if (mHitted)
     {
         return(HitResult.miss);        //hit済み
     }
     mHitted = true;
     hitted(this, aType);
     return(HitResult.consonant);
 }
예제 #3
0
    //音符にhitした
    protected void hitted(MyBehaviour aNoteObject, HitNoteType aType)
    {
        switch (aType)
        {
        case HitNoteType.delete:
            hitAndDelete(aNoteObject);
            break;

        case HitNoteType.decolorize:
            hitAndDecolorize(aNoteObject);
            break;
        }
    }
예제 #4
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);
 }
예제 #5
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);
 }
예제 #6
0
 //音符にhitするか
 public abstract HitResult hit(KeyCode aKey, HitNoteType aType);