示例#1
0
    public static void SelecteLanguage(string languageName)
    {
        PlayerPrefsUtil.SetString(PlayerPrefsUtil.LANGUAGE, languageName);
        InitLang();

        FontUtil.ChangeFont(GetTxt(10002));
    }
示例#2
0
    public IEnumerator LoadCommonRes()
    {
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            yield return(StartCoroutine(LoadManifest(true)));
        }
        else
        {
            yield return(StartCoroutine(LoadManifest(false)));
        }

        yield return(StartCoroutine(LoadFont()));

        yield return(StartCoroutine(LoadConfigs()));

        yield return(StartCoroutine(LoadIcons()));

        yield return(StartCoroutine(LoadDats()));

        yield return(StartCoroutine(LoadTxts()));

        yield return(StartCoroutine(LoadEffect()));

        GameModel.Instance.InitGameConfig();
        //if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            SocialModel.Instance.StartUp();
            //ADModel.Instance.Init ();
        }
        IAPModel.Instance.Init();
        LanguageUtil.InitLang();
        FontUtil.ChangeFont(LanguageUtil.GetTxt(10002));
        //ClockModel.Instance.SetClock (new ClockInfo (1));
        ClockModel.Instance.StartUp();

        yield return(StartCoroutine(LoadDependenciesAb("prefab/base.ab")));

        yield return(StartCoroutine(LoadDependenciesAb("audio.ab")));

        Debug.Log("LoadRes " + ResourceStatic.COMMON);
        if (EventHandler != null)
        {
            EventHandler(ResourceEventType.load_complete, ResourceStatic.COMMON);
        }
    }