Beispiel #1
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         Init();
         DontDestroyOnLoad(gameObject);
     }
 }
Beispiel #2
0
    void Awake()
    {
        // PlayerPrefs.DeleteAll();
        DontDestroyOnLoad(gameObject);

        _bigLv       = PlayerPrefs.GetInt("bigLv", 0);
        _newBallLv   = PlayerPrefs.GetInt("newBallLv", 0);     // 新球
        _newTempLv   = PlayerPrefs.GetInt("newTempLv", 0);     // 临时小球
        _ballNumLv   = PlayerPrefs.GetInt("ballNumLv", 0);     // 初始数量
        _ballScaleLv = PlayerPrefs.GetInt("ballScaleLv", 0);   // 尺寸
        _ballCritsLv = PlayerPrefs.GetInt("ballCritsLv", 0);   // 暴击

        languageID = PlayerPrefs.GetInt("languageID", 1);
        instance   = this;
        StartCoroutine(LoadGameData());

        CMPlaySDKUtils.Initialize();
    }