Exemple #1
0
 // Use this for initialization
 void Awake()
 {
     if (deck == null)          // set if not specifyed in inspector
     {
         GameObject player = GameObject.FindGameObjectWithTag("Player");
         if (player != null)
         {
             if (deck == null)
             {
                 deck = player.GetComponent <Deck>();
             }
             else
             {
                 Debug.LogError("Player Deck not found!");
             }
         }
     }
     cardCountText = GetComponentInChildren <defaultTextHolder>();
 }