void Start() { Instance = this; audioSource = GetComponent<AudioSource>(); currentCardsFaceUp = new List<MemoramaCard>(); for (int i = 0; i < 3; i++) { int r = Random.Range(0, cards.Count); line0.GetChild(i).GetComponent<MemoramaCard>().COLOR = cards[r]; line0.GetChild(i).GetComponent<MemoramaCard>().backside = backside; cards.RemoveAt(r); } for (int i = 0; i < 3; i++) { int r = Random.Range(0, cards.Count); line1.GetChild(i).GetComponent<MemoramaCard>().COLOR = cards[r]; line1.GetChild(i).GetComponent<MemoramaCard>().backside = backside; cards.RemoveAt(r); } for (int i = 0; i < 3; i++) { int r = Random.Range(0, cards.Count); line2.GetChild(i).GetComponent<MemoramaCard>().COLOR = cards[r]; line2.GetChild(i).GetComponent<MemoramaCard>().backside = backside; cards.RemoveAt(r); } Timer.TimeOut += OnTimeOut; }
public void Memor2(int nivel) { J_Mem = new Memorama(nivel); J_Mem.Dock = DockStyle.Fill; J_Mem.Name = "Juego"; Juego_G.Controls.Add(J_Mem); }