private void playJudgeText(JudgeType judgeType, NoteSoundType soundType) { this.noteJudgeTexts[(int)soundType].gameObject.SetActive(true); this.noteJudgeTexts[(int)soundType].text = judgeType.ToString(); this.noteJudgeTextTimers[(int)soundType] = 1.0f; switch (judgeType) { case JudgeType.PERFECT: this.noteJudgeTexts[(int)soundType].color = Color.yellow; break; case JudgeType.GREAT: this.noteJudgeTexts[(int)soundType].color = Color.green; break; case JudgeType.GOOD: this.noteJudgeTexts[(int)soundType].color = Color.blue; break; case JudgeType.SAFE: this.noteJudgeTexts[(int)soundType].color = Color.magenta; break; } }
private void createNote(MasterMusicScoreRecordData data, NoteSoundType soundType) { NoteObject noteObject = getInactiveNote(); noteObject.Position = data.position; noteObject.SoundType = soundType; int soundIndex = (int)soundType; GameObject posObject = this.noteObjectPositions[soundIndex]; Vector3 pos = noteObject.transform.localPosition; pos.x = posObject.transform.localPosition.x; pos.y = 0; // 初期値 noteObject.transform.localPosition = pos; }
public void Judge(NoteSoundType soundType, MasterMusicScoreRecordData data) { int soundTypeIndex = (int)soundType; foreach (NoteObject note in this.noteObjectList) { if (note.SoundType == soundType) { if (note.Position == data.position) { note.Judge(); break; } } } }
private bool calcOneTouchNote(uint note, bool isJudgeDone, float time, NoteSoundType noteSoundType) { bool returnJudgeDone = false; JudgeType judgeType = JudgeType.MISS; if (note > 0 && isJudgeDone == false) { if (this.progressTimer - PERFECT_INTERVAL <= time && time <= this.progressTimer + PERFECT_INTERVAL) { this.perfectCount++; this.perfectCountText.text = this.perfectCount.ToString(); returnJudgeDone = true; judgeType = JudgeType.PERFECT; } else if (this.progressTimer - GREAT_INTERVAL <= time && time <= this.progressTimer + GREAT_INTERVAL) { this.greatCount++; this.greatCountText.text = this.greatCount.ToString(); returnJudgeDone = true; judgeType = JudgeType.GREAT; } else if (this.progressTimer - GOOD_INTERVAL <= time && time <= this.progressTimer + GOOD_INTERVAL) { this.goodCount++; this.goodCountText.text = this.goodCount.ToString(); returnJudgeDone = true; judgeType = JudgeType.GOOD; } else if (this.progressTimer - SAFE_INTERVAL <= time && time <= this.progressTimer + SAFE_INTERVAL) { this.safeCount++; this.safeCountText.text = this.safeCount.ToString(); returnJudgeDone = true; judgeType = JudgeType.SAFE; } addScore(); if (judgeType != JudgeType.MISS) { playJudgeText(judgeType, noteSoundType); } } return(returnJudgeDone); }
private void playNoteEffect(NoteSoundType soundType) { int soundTypeIndex = (int)soundType; this.noteEffects[soundTypeIndex].Play(); }