public void SaveContent() { if (MyGame.Manager.ConfigManager.GlobalConfigData.DonotSave) { return; } if (null == storagePersistData) { storagePersistData = new StoragePersistData { HighScore = Constants.DEF_HIGH_SCORE, PlayAudio = MyGame.Manager.ConfigManager.GlobalConfigData.PlayAudio, CoolMusic = MyGame.Manager.ConfigManager.GlobalConfigData.CoolMusic, LevelType = MyGame.Manager.ConfigManager.GlobalConfigData.LevelType, LevelIndex = (Byte)(MyGame.Manager.ConfigManager.GlobalConfigData.LevelNo - 1), }; } else { storagePersistData.HighScore = MyGame.Manager.ScoreManager.HighScore; storagePersistData.PlayAudio = MyGame.Manager.SoundManager.PlayAudio; storagePersistData.CoolMusic = MyGame.Manager.StateManager.CoolMusic; storagePersistData.LevelType = MyGame.Manager.LevelManager.LevelType; storagePersistData.LevelIndex = MyGame.Manager.LevelManager.LevelIndex; } storageFactory.SaveContent(storagePersistData); }