// Start is called before the first frame update void Start() { List <string> deck = DeckFunction.GenerateDeck(); DeckFunct = FindObjectOfType <DeckFunction>(); userInput = FindObjectOfType <DeckUserInput>(); int i = 0; foreach (string card in deck) { if (this.name == card) { cardFace = DeckFunct.cardFaces[i]; break; } i++; } spriteRenderer = GetComponent <SpriteRenderer>(); selectable = GetComponent <DeckSelectable>(); }
// Start is called before the first frame update void Start() { DeckFunct = FindObjectOfType <DeckFunction>(); slot1 = this.gameObject; }