Esempio n. 1
0
    public static void InitSetting()
    {
        _settingData = SystemDataMgr.Data.SettingData;


        RefreshGameResolutions();
        //Application.targetFrameRate = 60;
    }
Esempio n. 2
0
    private void GetGameSettingData()
    {
        _gameInfoDic = FileHelper.ReadJsonFile <Dictionary <string, GameInfo> >(DomainHttpConfigPath);

        _gameSettingData = GameSetting.LoadGameSettingData();
        if (_gameSettingData == null)
        {
            _gameSettingData = new GameSettingData();
        }
        InitDomainAliasNameDic();
        InitGameTypeConfig();
        LoadSPChannelConfig(_gameSettingData.configSuffix, true);
        developmentBuild = EditorPrefs.GetBool(developmentBuildKey, false);
    }
    void InitGame()
    {
        gameData = GameManager.instance.gameData;
        GameManager.instance.OnTouch += OnTouch;

        currentBlockScale   = gameData.initialBlockScale;
        currentBlockCount   = 0;
        randomColorOffset   = Random.Range(0f, gameData.colorPalette.Length - 1f);
        randomBgColorOffset = Random.Range(0f, gameData.colorPalette.Length - 1f);

        background.InitColor(GetCurrentColor(randomBgColorOffset), GetCurrentColor(randomBgColorOffset + 1));



        currentBlock = preBlock = SpawnBlock(currentBlockScale, new Vector3(0f, -1f, 0f), GetCurrentColor(randomColorOffset));
        currentBlock.SetActive(false);

        firstBlock = SpawnBlock(currentBlockScale + new Vector3(0f, 2f, 0f), new Vector3(0f, -2f, 0f), GetCurrentColor(randomColorOffset));

        camOffset = Camera.main.gameObject.transform.position;
    }
Esempio n. 4
0
 public static void Save(this GameSettingData settingData)
 {
     SaveSystemData();
 }