public bomba(Mapa mapa, int x, int y) { this.mapa = mapa; this.x = x; this.y = y; smer = -1; }
public kanon(Mapa mapa, int x, int y) { this.mapa = mapa; this.x = x; this.y = y; smer = 3; }
public duch(Mapa mapa, int x, int y) { this.mapa = mapa; this.x = x; this.y = y; smer = mapa.rnd.Next(4); }
public int barva = 1; //zivoty public Had(Mapa mapa, int kdex, int kdey) { this.mapa = mapa; this.x = kdex; this.y = kdey; smer = -1; }
public ohnivaKoule(Mapa mapa, int x, int y) { this.mapa = mapa; this.x = x; this.y = y; smer = 2; }
public Koule(Mapa mapa, int x, int y, int smer) { this.mapa = mapa; this.x = x; this.y = y; this.smer = smer; }
public BombPad(Mapa mapa, int x, int y) { this.mapa = mapa; this.x = x; this.y = y; smer = 2; //pod sebe }
public ocas(Mapa mapa, PohyblivyPrvek otec, int x, int y) { this.mapa = mapa; this.x = x; this.y = y; mapa.VytvorOcas(x, y); this.otec = otec; mapa.PohyblivePrvky.Add(this); }
private void button1_Click(object sender, EventArgs e) { lvl = 1; g = Graphics.FromImage(DrawArea); CteckaPokoju.CtecPokoju("MyTest2.txt", "mapaPokoju.png"); //vytvoří soubor z mapa0.2.png mapa = new Mapa(lvl, "dot.png", barva, pocetOcasu); pocetOcasu = 4; barva = 0; timer1.Enabled = true; }
private void timer1_Tick_1(object sender, EventArgs e) { switch (mapa.stav) { case Stav.nezacala: pictureBox1.Visible = true; button1.Visible = true; stisknutaSipka = StisknutaSipka.zadna; pictureBox2.Visible = false; break; case Stav.zacala: pictureBox2.Image = DrawArea; mapa.vykresliSe(g, ClientSize.Width, ClientSize.Height, 3); pictureBox2.Visible = true; pictureBox1.Visible = false; button1.Visible = false; mapa.stav = Stav.bezi; break; case Stav.bezi: tic++; timer1.Enabled = false; if (tic % 4 == 0) { mapa.PohniVsemiPrvky(stisknutaSipka); } mapa.vykresliSe(g, ClientSize.Width, ClientSize.Height, tic % 4); if (mapa.stav != Stav.prohra) { Refresh(); } timer1.Enabled = true; this.Text = "skore - " + mapa.skore; break; case Stav.vyhra: timer1.Enabled = false; if (lvl < 6) { lvl++; pocetOcasu = mapa.had.pocetOcasu; barva = mapa.had.barva; MessageBox.Show("pokračujete do úrovně: " + lvl); celkoveSkore += mapa.skore; label2.Text = celkoveSkore.ToString(); mapa = new Mapa(lvl, "dot.png", barva, pocetOcasu); mapa.vykresliSe(g, ClientSize.Width, ClientSize.Height, 3); mapa.stav = Stav.bezi; stisknutaSipka = StisknutaSipka.zadna; timer1.Enabled = true; } else { MessageBox.Show("Vyhra!"); mapa.stav = Stav.nezacala; timer1.Enabled = true; } break; case Stav.prohra: timer1.Enabled = false; celkoveSkore += mapa.skore; label2.Text = celkoveSkore.ToString(); mapa.vykresliSe(g, ClientSize.Width, ClientSize.Height, 3); Refresh(); MessageBox.Show("Prohra!"); mapa.stav = Stav.nezacala; timer1.Enabled = true; break; default: break; } }
public Klic(Mapa mapa, int kdex, int kdey) { this.mapa = mapa; this.x = kdex; this.y = kdey; }
public Diamant(Mapa mapa, int kdex, int kdey) { this.mapa = mapa; this.x = kdex; this.y = kdey; }
public armor(Mapa mapa, int kdex, int kdey) { this.mapa = mapa; this.x = kdex; this.y = kdey; }
public Jablko(Mapa mapa, int kdex, int kdey) { this.mapa = mapa; this.x = kdex; this.y = kdey; }
public OdpalPlosina(Mapa mapa, int kdex, int kdey) { this.mapa = mapa; this.x = kdex; this.y = kdey; }
public ohen(Mapa mapa, int x, int y) { this.mapa = mapa; this.x = x; this.y = y; }