// Start is called before the first frame update void Start() { List <string> deck = CardGame.GenerateDeckLevel1(); cardGame = FindObjectOfType <CardGame>(); //int i = 0; foreach (string card in deck) { if (this.name == "Storm") { cardFace = cardGame.cardFaces[0]; } else if (this.name == "M_UpUp") { cardFace = cardGame.cardFaces[1]; } else if (this.name == "M_RightRight") { cardFace = cardGame.cardFaces[2]; } else if (this.name == "M_RightUp") { cardFace = cardGame.cardFaces[3]; } else if (this.name == "M_LeftLeft") { cardFace = cardGame.cardFaces[4]; } //i++; } spriteRenderer = GetComponent <SpriteRenderer>(); spriteRenderer.sprite = cardFace; }
public void WhenClicked() { List <string> deck = CardGame.GenerateDeckLevel1(); }