private void karta_Click(object sender, EventArgs e) { var card = (sender as CardGraphics)?.Owner; var walka = new Walka(); PrepareEnemyCardToFight(kartap); walka.Zmiana(kartag, card); counter++; if (kartag.CombatValue > kartap.CombatValue) { graczScore++; } if (graczScore >= 3 && counter == 7) { TryAgain.Hide(); NextLvl.Show(); } else if (graczScore < 3 && counter == 7) { NextLvl.Hide(); TryAgain.Show(); } }
private void poziom_Click() { var levelChange = new LvlChange(); Menu.Hide(); Poziomy.Hide(); Pomoc.Hide(); PrepareLevels(); levelChange.Change(karta1, karta2, karta3, karta4, karta5, karta6, karta7, kartag, kartap, _currentLevel, Informacje, Nazwa, NextLvl); Gra.Show(); Informacje.Hide(); NextLvl.Hide(); TryAgain.Hide(); counter = 0; graczScore = 0; rand = 7; }
private void NextLvl_Click(object sender, EventArgs e) { var levelChange = new LvlChange(); if (_currentLevel < 4) { _currentLevel++; levelChange.Change(karta1, karta2, karta3, karta4, karta5, karta6, karta7, kartag, kartap, _currentLevel, Informacje, Nazwa, NextLvl); NextLvl.Hide(); } else if (_currentLevel == 4) { Gra.Hide(); Menu.Show(); } counter = 0; graczScore = 0; rand = 7; }