Пример #1
0
 public static void Destroy()
 {
     if (mInstance != null)
     {
         Destroy(mInstance.gameObject);
         mInstance = null;
     }
 }
Пример #2
0
    public static void Init()
    {
        if (mInstance == null)
        {
            mInstance = new GameObject("_LaunchCounter").AddComponent(typeof(LaunchCounter)) as LaunchCounter;

            DontDestroyOnLoad(mInstance.gameObject);

//!!!			mInstance.launchCount = PlayerPrefs.GetInt(User.CharacterName + "_countExitFromBg", 0);
            mInstance.launchCount++;
        }
    }