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); }
public override HitResult hit(KeyCode aKey, HitNoteType aType) { if (mHitted) { return(HitResult.miss); //hit済み } mHitted = true; hitted(this, aType); return(HitResult.consonant); }
//音符にhitした protected void hitted(MyBehaviour aNoteObject, HitNoteType aType) { switch (aType) { case HitNoteType.delete: hitAndDelete(aNoteObject); break; case HitNoteType.decolorize: hitAndDecolorize(aNoteObject); break; } }
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); }
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); }
//音符にhitするか public abstract HitResult hit(KeyCode aKey, HitNoteType aType);