Ejemplo n.º 1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        gameConfig.Init(this);
        inputSetting.Init(this);
        mainGame.Init(this);
        resultMng.Init(this);

        debug.Init();

        dxCentre.Init();
        dxTextCentre.Init();
        dxHeatmapPanel.Init();
        // dxErrorPopup.Init();
        dxLoadingPanel.Init();

        systemCam.gameObject.SetActive(false);

        AudioMng.Init();

        IsInit = true;
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        settingData = Resources.Load <TGSettingData>("SettingData");

        if (settingData == null)
        {
            ErrorQuit("缺少Setting Data文件!务必确保Resources文件夹底下有SettingData");
            return;
        }

        Instance = this;

        gameConfig.Init(this);
        inputSetting.Init(this);
        mainGame.Init(this);
        resultMng.Init(this);

        dxCentre.OnInit(this);
        dxTextCentre.OnInit(this);
        dxHeatmapPanel.OnInit(this);

#if UNITY_EDITOR
        RootPath = Application.dataPath + "/TGFramework/";
#else
        RootPath = Application.dataPath.Replace(Application.productName + "_Data", string.Empty);
#endif
        fileWriter.Init(RootPath);

        GameNameCn = settingData.gameNameCn;

        systemCam.gameObject.SetActive(false);

        AudioMng.Init();

        IsInit = true;
    }