private void Start() { gameOverUI.SetActive(false); dealerHand = new PlayerData(CardPrefab, DealerMatt, dealerScoreUI); playerHand = new PlayerData(CardPrefab, PlayerMatt, playerScoreUI); MasterDeck.InitialDeal(playerHand, dealerHand); }
public void ResetGame() { //wipe existing data MasterDeck.ResetMasterDeck(); playerHand.ResetPlayerData(); dealerHand.ResetPlayerData(); gameOverUI.SetActive(false); //set up new game MasterDeck.InitialDeal(playerHand, dealerHand); //enable buttons hitButton.interactable = true; standButton.interactable = true; }
private void Start() { DelegateCreation(); gameOverUI.SetActive(false); quitPromptUI.SetActive(false); dealerHand = new PlayerData(CardPrefab, DealerMatt, dealerScoreUI); playerHand = new PlayerData(CardPrefab, PlayerMatt, playerScoreUI); MasterDeck.InitialDeal(playerHand, dealerHand); if (playerHand.HandValues[1] == 21 || playerHand.HandValues[0] == 21) { StandClick(); } }