Ejemplo n.º 1
0
        // todo nivel comienza con bombita en la posicion (0, 0) del tablero; este metodo permite
        // cargar el tablero con los datos iniciales
        public virtual void Cargar()
        {
            this.tablero.Reiniciar();
            this.tablero = Tablero.GetInstancia();

            this.bombita.Reiniciar();
            this.bombita = Bombita.GetInstancia();
            this.tablero.AgregarEntidad(bombita, 0, 0);
        }
Ejemplo n.º 2
0
 public Nivel()
 {
     this.cantidadDeCecilios = 0;
     this.cantidadDeLopezReggaes = 0;
     this.cantidadDeLopezReggaesAlados = 0;
     this.cantidadDeObstaculosDeLadrillo = 0;
     this.cantidadDeObstaculosDeCemento = 0;
     this.cantidadDeObstaculosDeAcero = 0;
     this.vidas = VIDAS_POSIBLES;
     this.bombita = Bombita.GetInstancia();
     this.tablero = Tablero.GetInstancia();
 }
Ejemplo n.º 3
0
 public Nivel(int cecilios, int lopezReggaes, int lopezReggaesAlados, 
     int obstaculosDeLadrillo, int obstaculosDeCemento, int obstaculosDeAcero)
 {
     this.cantidadDeCecilios = cecilios;
     this.cantidadDeLopezReggaes = lopezReggaes;
     this.cantidadDeLopezReggaesAlados = lopezReggaesAlados;
     this.cantidadDeObstaculosDeLadrillo = obstaculosDeLadrillo;
     this.cantidadDeObstaculosDeCemento = obstaculosDeCemento;
     this.cantidadDeObstaculosDeAcero = obstaculosDeAcero;
     this.vidas = VIDAS_POSIBLES;
     this.bombita = Bombita.GetInstancia();
     this.tablero = Tablero.GetInstancia();
 }
Ejemplo n.º 4
0
 // retorna la instancia de tablero
 public static Tablero GetInstancia()
 {
     if (INSTANCIA == null)
         INSTANCIA = new Tablero();
     return (INSTANCIA);
 }
Ejemplo n.º 5
0
 // este metodo es utilizado cuando se comienza el primer nivel,
 // cuando se pasa de nivel o cuando el usuario pierde una vida
 public void Reiniciar()
 {
     INSTANCIA = new Tablero();
 }
Ejemplo n.º 6
0
 public void SetTablero(Tablero _tablero)
 {
     this.tablero = _tablero;
 }