Esempio n. 1
0
        private MyServerAction CheckpointLoaded(MyMwcObjectBuilder_Checkpoint checkpoint)
        {
            MyGameplayConstants.SetGameplayDifficulty(checkpoint.SessionObjectBuilder.Difficulty);

            Debug.Assert((checkpoint.CheckpointName == null && checkpoint.CurrentSector.UserId != null) || (checkpoint.CheckpointName != null && checkpoint.CurrentSector.UserId == null));

            var cacheSector = MyLocalCache.LoadSector(checkpoint.CurrentSector);

            if (cacheSector != null)
            {
                checkpoint.SectorObjectBuilder = cacheSector;
                MyGuiScreenGamePlay.ReloadGameplayScreen(checkpoint, MyMwcStartSessionRequestTypeEnum.LOAD_CHECKPOINT, MyGuiScreenGamePlayType.GAME_STORY);
                return(null);
            }
            else
            {
                // Checkpoint and sector is stored on filesystem
                throw new MyDataCorruptedException("Last checkpoint sector corrupted");

                //MyServerAction loadAction = new MyServerAction(MyTextsWrapperEnum.EnterSectorInProgressPleaseWait);
                //loadAction.BeginAction = c => c.BeginLoadSector(null, c);
                //loadAction.EndAction = (c, r) => LastCheckpointSectorLoaded(checkpoint, c.EndLoadSector(r));
                //loadAction.Start();
                //return loadAction;
            }
        }
        protected override void ProgressStart()
        {
            //MyClientServer.SendMessageStartSessionRequest(m_sessionType, m_sectorIdentifier, m_difficulty);

            MyGameplayConstants.SetGameplayDifficulty(m_difficulty);
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MySession"/> class.
 /// </summary>
 public MySinglePlayerSession(MyGameplayDifficultyEnum difficulty)
 {
     MyGameplayConstants.SetGameplayDifficulty(difficulty);
 }