public override void IntegracjaGracz(Gracz gracz, int x, int y, EkranGry gra) { if (otwarty) { return; } gracz.Zloto += Zloto; gracz.Plecak.AddRange(Przedmioty); gra.Komunikat = "W skrzyni znalazłeś "; if(Zloto>0) { gra.Komunikat += string.Format("{0} złota ", Zloto); } if(Przedmioty.Any()) { var nazwy=Przedmioty.Select(z=>z.Nazwa).ToList(); gra.Komunikat += nazwy.Aggregate((current, next) => current + ", " + next); } gra.CzasWyswietlanieKomunikatu = 2000; otwarty = true; }
public override void IntegracjaGracz(Gracz gracz, int x, int y, EkranGry gra) { }
public override void IntegracjaGracz(Gracz gracz, int x, int y, EkranGry gra) { EkranHandel ekran = new EkranHandel(gracz, this); ekran.ShowDialog(); }
public abstract void IntegracjaGracz(Gracz gracz, int x, int y,EkranGry gra);
public override void IntegracjaGracz(Gracz gracz, int x, int y, EkranGry gra) { EkranDialog dialog = new EkranDialog(dialogi); dialog.ShowDialog(); }