public GameObject NewCardObject(Playingcard newCard) { GameObject newCardGameObject = Instantiate(gameObject); PTMono_Playingcard mono = newCardGameObject.GetComponent <PTMono_Playingcard>(); mono.UpdateContent(newCard); return(newCardGameObject); }
private void OnTriggerEnter(Collider other) { PTMono_Playingcard playingCard = other.GetComponent <PTMono_Playingcard>(); if (playingCard) { cards.Add(playingCard.Card); Destroy(other.gameObject); UpdateContent(); } }