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); }
public void ActiveShop() { InstancesManager instancesManager = gameMaster.GetComponent <InstancesManager> (); UpgradeCanvasManager ucmScript = instancesManager.GetTowerOfTheTime(); if (ucmScript != null) { instancesManager.SetTowerOfTheTime(ucmScript); } ShopGObj.SetActive(true); }