Beispiel #1
0
        private void GoToPlay(GoToPlayNetworkData goToPlayNetworkData)
        {
            lastPlayState = LastPlayState.GoToPlay;
            var playUserList = new List <User>();

            foreach (User user in userList)
            {
                if (goToPlayNetworkData.PlayerIds.Contains(user.ID))
                {
                    playUserList.Add(user);
                    user.CurrentState = UserState.NotReady;
                }
            }
            SceneManager.PrepareNextScene(this, new MainGame(device), new Dictionary <string, object>
            {
                { "ByteReader", byteReader },
                { "Client", client },
                { "SongInformation", currentSelectSong.SongInformation },
                { "Difficulty", currentSelectSong.Difficulty },
                { "Users", playUserList.ToArray() },
                { "AllowedModList", allowedModList },
                { "Self", selfUser },
                { "MuteSE", leftMenu.MuteSE },
                { "Connect", leftMenu.Connect },
                { "GameRule", currentRule }
            }, null, true);
            movieManager.Stop();
        }
Beispiel #2
0
        private void PlayGame()
        {
            selfUser.CurrentState = UserState.Playing;
            client.Write(MessagePackSerializer.Serialize(new ChangeUserStateNetworkData {
                State = selfUser.CurrentState
            }));
            lastPlayState = LastPlayState.TryToPlayGame;
            var gameutility = new PPDGameUtility
            {
                SongInformation = currentSelectSong.SongInformation,
                Difficulty      = currentSelectSong.Difficulty,
                DifficultString = currentSelectSong.SongInformation.GetDifficultyString(currentSelectSong.Difficulty),
                Profile         = ProfileManager.Instance.Profiles[1],
                AutoMode        = AutoMode.None,
                SpeedScale      = 1,
                MuteSE          = leftMenu.MuteSE,
                Connect         = leftMenu.Connect
            };
            var dic = new Dictionary <string, object>
            {
                { "PPDGameUtility", gameutility },
                { "GameInterface", new GameInterface(device) },
                { "GameResult", null },
                { "PauseMenu", new PPDShareComponent.PauseMenu(device, Utility.Path) },
                { "MarkImagePath", new MarkImagePaths() }
            };

            SceneManager.PrepareNextScene(this, new PPDCore.MainGame(device), dic, dic, true);

            movieManager.Stop();
        }
Beispiel #3
0
 /// <summary>
 /// 今選択している譜面をプレイします
 /// </summary>
 public void PreviewPlay(Difficulty difficulty, float startTime)
 {
     ChangeSceneToMainGame(difficulty, startTime, true, false);
     lastPlayState = LastPlayState.Preview;
 }
Beispiel #4
0
 public void PlayGame()
 {
     ChangeSceneToMainGame(Difficulty, ssm.SelectedSongInformation.SongInfo.StartTime, true, true);
     lastPlayState = LastPlayState.Play;
 }