public void ChangeSongInfo(SongInformation songinfo) { this.songinfo = songinfo; if (!songinfo.IsPPDSong) { return; } exist = new bool[6]; exist[0] = true; exist[1] = (songinfo.Difficulty & SongInformation.AvailableDifficulty.Easy) == SongInformation.AvailableDifficulty.Easy; exist[2] = (songinfo.Difficulty & SongInformation.AvailableDifficulty.Normal) == SongInformation.AvailableDifficulty.Normal; exist[3] = (songinfo.Difficulty & SongInformation.AvailableDifficulty.Hard) == SongInformation.AvailableDifficulty.Hard; exist[4] = (songinfo.Difficulty & SongInformation.AvailableDifficulty.Extreme) == SongInformation.AvailableDifficulty.Extreme; exist[5] = songinfo.IsPPDSong; infos[0].Text = songinfo.BPM.ToString(); infos[5].Text = songinfo.ScoreAuthor; for (int i = 1; i <= 4; i++) { infos[i].Text = songinfo.GetDifficultyString((Difficulty)(i - 1)); if (exist[i]) { difficulties[i - 1].Color = new Color4(1, 1, 1, 1); } else { difficulties[i - 1].Color = new Color4(1, 0.3f, 0.3f, 0.4f); } score[i - 1] = songinfo.GetScore((Difficulty)(i - 1)); } }
private void ChangeSceneToMainGame(SongInformation songInfo, Difficulty difficulty, float startTime, bool useStack, bool useItem, int replayResultId) { // メインゲーム用のパラメータの準備 var gameutility = new PPDGameUtility { SongInformation = songInfo, Difficulty = difficulty, DifficultString = songInfo.GetDifficultyString(difficulty), Profile = ProfileManager.Instance.Current, AutoMode = oc.AutoMode, SpeedScale = oc.SpeedScale, Random = oc.Random, MuteSE = oc.MuteSE, Connect = oc.Connect, PerfectTrial = oc.PerfectTrial, RivalGhost = oc.RivalGhost, RivalGhostCount = oc.RivalGhostCount, ReplayResultId = replayResultId }; if (useItem && lm.UseItem != null && !lm.UseItem.IsUsed) { gameutility.AddItem(lm.UseItem); gameutility.AutoMode = AutoMode.None; } if (ssm.SelectedSongInformation is ContestSelectedSongInfo) { var contest = ssm.SelectedSongInformation as ContestSelectedSongInfo; gameutility.RankingUpdateFunc = contest.GetRanking; } SkinSetting.Setting.Connect = oc.Connect; SkinSetting.Setting.RivalGhost = oc.RivalGhost; SkinSetting.Setting.RivalGhostCount = oc.RivalGhostCount; var dic = new Dictionary <string, object> { { "PPDGameUtility", gameutility }, { "GameInterface", new GameInterface(device) }, { "GameResult", new GameResult(device) }, { "PauseMenu", new PauseMenu(device, Utility.Path) }, { "MarkImagePath", new MarkImagePaths() } }; if (!useStack) { dic.Add("NextScene", typeof(Menu)); } if (gameutility.SongInformation.StartTime != startTime) { dic.Add("StartTime", startTime); } // 最後の曲選択を残しておく dic.Add("CurrentRoot", ssm.CurrentRoot); dic.Add("CurrentLogicRoot", ssm.CurrentLogicRoot); dic.Add("CurrentMode", ssm.CurrentMode); dic.Add("SelectedIndex", ssm.SelectedIndex); var mainGame = new MainGame(device); mainGame.CannotStartPerfectTrial += mainGame_CannotStartPerfectTrial; mainGame.PerfectTrialError += mainGame_PerfectTrialError; mainGame.PerfectTrialStart += mainGame_PerfectTrialStart; SceneManager.PrepareNextScene(this, mainGame, dic, dic, useStack); if (useStack) { menuMovie.Stop(); } }