示例#1
0
    public void Init(bool bForceReInit)
    {
        ResourceManager.singleton.SetAllLoadFinishedEventHandler(new Action <bool>(this.OnBeforeStartGameResourceLoadFinished));//当资源全部加载完成之后回调,进入登陆状态
        if (bForceReInit)
        {
            this.PreInit();
        }
        else
        {
            if (this.m_bHasInited)
            {
                return;
            }
        }
        this.m_bHasInited = true;
        Singleton <ScreenManager> .singleton.Init();//设置fps=60帧

        Singleton <PublishConfig> .singleton.Init();

        Singleton <WordFilter> .singleton.Init();

        GameConfig.singleton.Init();
        SkillGameManager.Init();
        GameConfig.singleton.DoGlobalConfig();  //设置游戏的运行速度
        Singleton <ConfigCS> .singleton.Init(); //电脑配置信息

        Singleton <UITipConfigMgr> .singleton.Init();

        Singleton <NetworkManager> .singleton.Init();

        Singleton <AudioManager> .singleton.Init();
    }
示例#2
0
 public void PreInit()
 {
     this.m_log.Debug("ClientMain.PreInit()");
     StringConfigMgr.singleton.Init();
     ResourceManager.singleton.Init(UnityGameEntry.Instance.GetComponent("GameResourceManager") as IResourceManager);
     SkillGameManager.Init();
 }