// Start is called before the first frame update void Start() { if (true) { DifficultyText = DifficultyTextObject.GetComponent <Text> (); SongNameText = SongNameTextObject.GetComponent <Text> (); ComposerText = ComposerTextObject.GetComponent <Text> (); ScoreText = ScoreTextObject.GetComponent <Text> (); RankText = RankTextObject.GetComponent <Text> (); JudgeResultText = JudgeResultTextObject.GetComponent <Text> (); MaxComboText = MaxComboTextObject.GetComponent <Text> (); TapToNextText = TapToNextTextObject.GetComponent <Text> (); JacketImage = JacketImageObject.GetComponent <RawImage> (); } DifficultyText.text = GVContainer.difficultiesName[GVContainer.stage] + " " + GVContainer.difficulty[GVContainer.stage]; SongNameText.text = GVContainer.displayName; ComposerText.text = GVContainer.composer; int score = (int)Math.Round(GVContainer.score); string formattedScore = String.Format("{0:00000000}", score); ScoreText.text = formattedScore.Substring(0, 2) + "'" + formattedScore.Substring(2, 3) + "'" + formattedScore.Substring(5, 3); RankText.text = clearRankCalculate(score); JudgeResultText.text = GVContainer.results[0] + Environment.NewLine + GVContainer.results[1] + Environment.NewLine + GVContainer.results[2] + Environment.NewLine + GVContainer.results[3]; MaxComboText.text = GVContainer.maxCombo.ToString(); string path = Application.dataPath.Replace("/", "\\") + "\\Musics\\" + GVContainer.songName + ".jpg"; StartCoroutine(downloadImage(path)); serial = serialControllerObject.GetComponent <SerialController> (); }
// Start is called before the first frame update void Start() { for (int i = 0; i < 7; i++) { DisplayJackets[i] = DisplayJacketObjects[i].GetComponent <RawImage> (); } for (int i = 0; i < 4; i++) { DifficultyLabelText[i] = DifficultyLabelTextObject[i].GetComponent <Text> (); } SongNameText = SongNameTextObject.GetComponent <Text> (); ComposerText = ComposerTextObject.GetComponent <Text> (); LevelText = LevelTextObject.GetComponent <Text> (); DifficultyText = DifficultyTextObject.GetComponent <Text> (); SpeedText = SpeedTextObject.GetComponent <Text> (); ConfirmText = ConfirmTextObject.GetComponent <Text> (); MapperText = MapperTextObject.GetComponent <Text> (); setJacketImage(selectPosition); DisplayMusicInfomation(); StartDemoMusic(); audioSource = GetComponent <AudioSource> (); }