Esempio n. 1
0
        private static void Init()
        {
            if (initilized)
            {
                return;
            }

            if (PlayerPrefs.HasKey(strKey))
            {
                dontShowWeclomeMessageAgain = CommonUtil.ZeroOneToTrueFalseBool(PlayerPrefs.GetInt(strKey));
            }

            if (dontShowWeclomeMessageAgain)
            {
                return;
            }

            window = (WelcomePopup)EditorWindow.GetWindow(typeof(WelcomePopup));
            window.titleContent.text = "Welcome";
            window.maxSize           = size;
            window.maximized         = true;
            window.position          = new Rect((Screen.currentResolution.width - size.x) / 2, (Screen.currentResolution.height - size.y) / 2, size.x, size.y);
            window.Show();
            window.Focus();

            initilized = true;

            PlayerPrefs.SetInt(strKey, CommonUtil.TrueFalseBoolToZeroOne(true));
        }
Esempio n. 2
0
 static void ReadManual()
 {
     initilized = false;
     PlayerPrefs.SetInt(strKey, CommonUtil.TrueFalseBoolToZeroOne(false));
     Init();
 }
 /// <summary>
 /// Save the shape locked status.
 /// </summary>
 /// <param name="ID">The ID of the shape.</param>
 /// <param name="isLocked">Whether the shape is locked or not.</param>
 public static void SaveShapeLockedStatus(int ID, bool isLocked)
 {
     PlayerPrefs.SetInt(GetLockedStrKey(ID), CommonUtil.TrueFalseBoolToZeroOne(isLocked));
     PlayerPrefs.Save();
 }