Example #1
0
 private void Start()
 {
     gameOverUI.SetActive(false);
     dealerHand = new PlayerData(CardPrefab, DealerMatt, dealerScoreUI);
     playerHand = new PlayerData(CardPrefab, PlayerMatt, playerScoreUI);
     MasterDeck.InitialDeal(playerHand, dealerHand);
 }
Example #2
0
 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;
 }
Example #3
0
 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();
     }
 }