示例#1
0
    public void DisplayWindow()
    {
        GameManager.isPausing = true;

        Cosmetic_Previewer.singleton.Reset();

        gameObject.SetActive(true);

        for (int i = 0; i < cosmeticsParent.childCount; i++)
        {
            Cosmetic _cosmetic = cosmeticsParent.GetChild(i).GetComponent <Cosmetic>();
            _cosmetic.Reset();
        }
    }
示例#2
0
    public void CheckNewVisible()
    {
        // No need to check

        /*if (PlayerPrefs.GetInt("newCosmeticVisible") == 1)
         * {
         *      return;
         * }*/

        // Check starting

        //int _firstLockedIndex = -1;

        for (int i = 1; i < cosmeticsParent.childCount; i++)
        {
            Cosmetic _cosmetic = cosmeticsParent.GetChild(i).GetComponent <Cosmetic>();
            _cosmetic.Reset();

            //print ("cosmetic " + i + " is new ? " + _cosmetic.isNew);

            if (_cosmetic.isNew)
            {
                //print(_cosmetic.name + " is new! should open window!");
                int      _firstLockedIndex = i;
                Cosmetic _lockedCosmetic   = cosmeticsParent.GetChild(_firstLockedIndex).GetComponent <Cosmetic>();

                exclamationPoint.SetActive(true);
                guiMessenger.OpenWindow(i, _lockedCosmetic);

                PlayerPrefs.SetInt("newCosmeticVisible", 1);
                return;
            }

            else if (!_cosmetic.isVisible || i >= cosmeticsParent.childCount - 1)
            {
                return;
            }
        }
    }