Beispiel #1
0
    public void SetTowerOfTheTime(UpgradeCanvasManager _set)
    {
        if (towerOfTheTime == null)
        {
            towerOfTheTime = _set;
            towerOfTheTime.GetUpCanvas().SetActive(true);

            if (sphereShop.IsShopping())
            {
                sphereShop.DesactiveShop();
            }

            return;
        }

        // Maybe we can put some animation on deactivating one canvas
        towerOfTheTime.GetUpCanvas().SetActive(false);

        if (_set == towerOfTheTime)
        {
            towerOfTheTime = null;
            return;
        }

        towerOfTheTime = _set;

        // And an animation to activate other
        towerOfTheTime.GetUpCanvas().SetActive(true);
    }