Ejemplo n.º 1
0
 public void createProfesor(int i, int x, int y)
 {
     Profesor prof = null;
     switch (i)
     {
         case 0:
             prof = null;
             break;
         case 1:
             prof = new Profesor(new Point(x - 30, y - 30), 60, 60, 30, 100, 30,1000,"1");
             break;
         case 2:
             prof = new Profesor(new Point(x - 30, y - 30), 60, 60, 50, 150, 30, 1500, "2");
             break;
         case 3:
             prof = new Profesor(new Point(x - 30, y - 30), 60, 60, 40, 100, 15, 2000, "3");
             break;
         case 4:
             prof = new Profesor(new Point(x - 30, y - 30), 60, 60, 100, 200, 60, 2500, "4");
             break;
         case 5:
             prof = new Profesor(new Point(x - 30, y - 30), 60, 60, 120, 300, 50, 3000, "5");
             break;
         case 6:
             prof = new Profesor(new Point(x - 30, y - 30), 60, 60, 150, 200, 40, 3500, "6");
             break;
         default:
             Console.WriteLine("Default case");
             break;
     }
     if (prof != null && canGenProf())
     {
         if (cash >= prof.price)
         {
             profesors.Add(prof);
             cash -= prof.price;
             formPlay.cash.Text = cash + "";
         }
     }
 }
Ejemplo n.º 2
0
 public void showDetails(int p)
 {
     Profesor prof=null;
     switch (p)
     {
         case 0:
             prof = null;
             break;
         case 1:
             prof = new Profesor(new Point(0, 0), 60, 60, 30, 100, 30, 1000, "1");
             break;
         case 2:
             prof = new Profesor(new Point(0, 0), 60, 60, 50, 150, 30, 1500, "2");
             break;
         case 3:
             prof = new Profesor(new Point(0, 0), 60, 60, 50, 100, 15, 2000, "3");
             break;
         case 4:
             prof = new Profesor(new Point(0, 0), 60, 60, 150, 200, 60, 2500, "4");
             break;
         case 5:
             prof = new Profesor(new Point(0, 0), 60, 60, 200, 300, 50, 3000, "5");
             break;
         case 6:
             prof = new Profesor(new Point(0,0), 60, 60, 220, 200, 40, 3500, "6");
             break;
         default:
             break;
     }
     formPlay.tbDem.Text = prof.demage + "";
     formPlay.tbRange.Text = prof.range + "";
     formPlay.tbAtackSpeed.Text = prof.fireRate + "";
     formPlay.tbPrice.Text = prof.price + "";
 }
Ejemplo n.º 3
0
 public void drowProfesor(Profesor p, Graphics g)
 {
     g.DrawImage(p.img, p.position.x, p.position.y,60,60);
     g.DrawEllipse(new Pen(Brushes.Silver), p.centerPosition.x - p.range, p.centerPosition.y - p.range, p.range * 2, p.range * 2);
 }