Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public override void IntegracjaGracz(Gracz gracz, int x, int y, EkranGry gra)
 {
 }
Ejemplo n.º 3
0
 public override void IntegracjaGracz(Gracz gracz, int x, int y, EkranGry gra)
 {
     EkranHandel ekran = new EkranHandel(gracz, this);
     ekran.ShowDialog();
 }
Ejemplo n.º 4
0
 public abstract void IntegracjaGracz(Gracz gracz, int x, int y,EkranGry gra);
Ejemplo n.º 5
0
 public override void IntegracjaGracz(Gracz gracz, int x, int y, EkranGry gra)
 {
     EkranDialog dialog = new EkranDialog(dialogi);
     dialog.ShowDialog();
 }