public void Init(SongMeta songMeta, PlayerProfile playerProfile, string voiceIdentifier, MicProfile micProfile) { this.SongMeta = songMeta; this.PlayerProfile = playerProfile; this.MicProfile = micProfile; Voice = LoadVoice(songMeta, voiceIdentifier); PlayerScoreController.Init(Voice); PlayerNoteRecorder.Init(this, playerProfile, micProfile); }
public void Init(SongMeta songMeta, PlayerProfile playerProfile, string voiceIdentifier) { this.SongMeta = songMeta; this.PlayerProfile = playerProfile; Voice = LoadVoice(songMeta, voiceIdentifier); playerUiArea = FindObjectOfType <PlayerUiArea>(); PlayerScoreController = GetComponentInChildren <PlayerScoreController>(); PlayerScoreController.Init(Voice); PlayerNoteRecorder = GetComponentInChildren <PlayerNoteRecorder>(); if (PlayerNoteRecorder == null) { throw new NullReferenceException("PlayerNoteRecorder is null!"); } PlayerNoteRecorder.Init(this, playerProfile.Difficulty.RoundingDistance); CreatePlayerUi(); sentenceIndex = 0; UpdateSentences(sentenceIndex); }