void Start() { copyOfCompleteDeckOfCards = new Dictionary <int, cardClass>(CardsReadIn.CompleteDeckOfCards); //gets reference to DrawScript and CardFunctions// DrawScriptRef = GetComponent <drawScript>(); CardFunctionsRef = GetComponent <CardFunctions>(); ActiveSupplyRef = GetComponent <ActiveSupply>(); EnemyCreationRef = GetComponent <EnemyCreation>(); SortPlayers(PlayerCreation.listOfSelectedPlayers); PlayerActive(); //creates the first slime if (loadEnemy == "Slime") { EnemyCreationRef.LargeSlimeCreation(); } else if (loadEnemy == "Rat") { EnemyCreationRef.RatGameScene(); } #region Set UIs MainUI.SetActive(true); ActiveSupplyUI.SetActive(false); discardSelectionUI.SetActive(false); destroyCardSelectionUI.SetActive(false); gameOverUI.SetActive(false); winUI.SetActive(false); #endregion UpdateEnemyTransforms(); }
public void ShowActiveSupply() { cardSeleceted = -1; setActiveBool = !setActiveBool; ActiveSupplyUI.SetActive(setActiveBool); MainUI.SetActive(!setActiveBool); if (setActiveBool == true) { ActiveSupplyRef.DisplayActiveSupply(activePlayer); activePlayer.activeSupplyResourceUI.GetComponent <Animator>().ResetTrigger("resourceChange"); activePlayer.activeSupplyResourceUI.transform.GetChild(0).GetComponent <Text>().text = ""; } if (setActiveBool == false) { ASbuyButton.SetActive(false); resourceNameandvalue.text = activePlayer.resourceName + ": " + activePlayer.resourceValue; activePlayer.resourceUI.GetComponent <Animator>().ResetTrigger("resourceChange"); activePlayer.resourceUI.transform.GetChild(0).GetComponent <Text>().text = ""; } }