Пример #1
0
 public void SaveSetting()
 {
     if (SettingSaveData == null)
     {
         SettingSaveData = new SettingData();
     }
     gameMain.fileMgr.CreateJsonSaveData(GetDataPath() + "/Setting", SettingSaveData);
 }
Пример #2
0
 public override void Awake()
 {
     SettingSaveData = gameMain.gameDataMgr.SettingSaveData;
     //LoadLanguageCache
     dicLauguageCN = gameMain.fileMgr.LoadJsonDataBase <Dictionary <string, string> >("Language_CN");
     dicLauguageEN = gameMain.fileMgr.LoadJsonDataBase <Dictionary <string, string> >("Language_EN");
     fontCN        = gameMain.resourcesMgr.LoadResource <Font>(@"Fonts\FZYH");
     fontEN        = gameMain.resourcesMgr.LoadResource <Font>(@"Fonts\ARJULIAN");
 }
Пример #3
0
 public override void Awake()
 {
     SettingSaveData = gameMain.gameDataMgr.SettingSaveData;
     // 加载语言本地化数据文件
     languageCN_Dict = gameMain.fileMgr.LoadJsonDataBase <Dictionary <string, string> >("Language_CN");
     languageEN_Dict = gameMain.fileMgr.LoadJsonDataBase <Dictionary <string, string> >("Language_EN");
     // 加载语言对应的字体
     fontCN = gameMain.resourcesMgr.LoadResource <Font>(fontPathCN);
     fontEN = gameMain.resourcesMgr.LoadResource <Font>(fontPathEN);
     Debug.Log("LanguageMgr加载完毕");
 }
Пример #4
0
 public void LoadSetting()
 {
     SettingSaveData = gameMain.fileMgr.LoadJsonSaveData <SettingData>(GetDataPath() + "/Setting");
     if (SettingSaveData == null)
     {
         Debug.Log("未能找到设置,自动创建");
         SettingSaveData = new SettingData(); // 创建初始设置
         SaveSetting();
     }
     else
     {
         Debug.Log("已读取设置");
     }
 }
Пример #5
0
        public override void Awake()
        {
            SettingSaveData = gameMain.gameDataMgr.SettingSaveData;

            if (gameObject == null)
            {
                gameObject                   = new GameObject("AudioMgr");
                musicAudioSource             = gameObject.AddComponent <AudioSource>();
                musicAudioSource.loop        = true;
                musicAudioSource.playOnAwake = false;
                musicAudioSource.volume      = SettingSaveData.MusicVolume / 100.0f; // /100
                Object.DontDestroyOnLoad(gameObject);
            }

            _musicPathList.Add("FinalBattle");
        }
Пример #6
0
 public override void Awake()
 {
     SettingSaveData = gameMain.gameDataMgr.SettingSaveData;
     // 实例化设置
     if (gameObject == null)
     {
         gameObject                   = new GameObject("AudioMgr");
         musicAudioSource             = gameObject.AddComponent <AudioSource>();
         musicAudioSource.loop        = true;
         musicAudioSource.playOnAwake = false;
         musicAudioSource.volume      = SettingSaveData.MusicVolume / 100.0f; // /100
         Object.DontDestroyOnLoad(gameObject);
     }
     // 添加音乐
     musicPathList.Add("WhiteLie");
     Debug.Log("音乐列表确认完毕");
 }
Пример #7
0
        public override void Awake()
        {
            SettingSaveData = gameMain.gameDataMgr.SettingSaveData;

            if (gameObject == null)
            {
                gameObject                   = new GameObject("AudioMgr");
                musicAudioSource             = gameObject.AddComponent <AudioSource>();
                musicAudioSource.loop        = true;
                musicAudioSource.playOnAwake = false;
                musicAudioSource.volume      = SettingSaveData.MusicVolume / 100.0f; // /100
                Object.DontDestroyOnLoad(gameObject);
            }
            // 添加音乐
            _musicPathList.Add("Opening");
            _musicPathList.Add("FinalBattle");
            _musicPathList.Add("TheLastGuardian");
            _musicPathList.Add("Torch");
            _musicPathList.Add("WhiteLie");
            _musicPathList.Add("Medieval");
            _musicPathList.Add("HWComplex5");
            _musicPathList.Add("Horror");
            _musicPathList.Add("Night");
        }