Example #1
0
    private void Awake()
    {
        ins             = this;
        activeSceneName = SceneManager.GetActiveScene().name;

        scorePanel.SetActive(false);
        WeaponPrefabPool.ClearAllPool();
        RewardPrefabPool.ClearAllPool();

        if (!MultiLanguageMgr.jsonLoaded)
        {
            MultiLanguageMgr.LoadJson();
        }
        if (!PlayerPreference.loaded)
        {
            PlayerPreference.ReadFromSavedPref();
        }
        MultiLanguageMgr.SwitchAllTextsLanguage(PlayerPreference.Language);

        ResourceRequest request = PauseMenu.LoadAsync();

        request.completed += delegate {
            pauseMenu = Instantiate((PauseMenu)request.asset, MainCanvas.transform);
            pauseMenu.gameObject.SetActive(false);
        };

        StartCoroutine(LoadSetting());
    }
Example #2
0
 static public void InitialLoading()
 {
     if (!MultiLanguageMgr.jsonLoaded)
     {
         MultiLanguageMgr.LoadJson();
     }
     if (!PlayerPreference.loaded)
     {
         PlayerPreference.ReadFromSavedPref();
     }
     if (!SavingMgr.Loaded)
     {
         SavingMgr.LoadSaving();
     }
     MultiLanguageMgr.SwitchAllTextsLanguage(PlayerPreference.Language);
     PlayerPreference.ApplyAllPreference();
 }