Beispiel #1
0
 public Nivel()
 {
     this.cantidadDeCecilios = 0;
     this.cantidadDeLopezReggaes = 0;
     this.cantidadDeLopezReggaesAlados = 0;
     this.cantidadDeObstaculosDeLadrillo = 0;
     this.cantidadDeObstaculosDeCemento = 0;
     this.cantidadDeObstaculosDeAcero = 0;
     this.bombita = new Bombita();
     this.tablero = new Tablero();
 }
Beispiel #2
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.bombita = new Bombita();
     this.tablero = new Tablero();
 }
Beispiel #3
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 = new Tablero();

            this.bombita.Reiniciar();
            this.bombita = new Bombita();
            this.tablero.AgregarEntidad(bombita, 1, 1);

            this.inicializar();
        }
Beispiel #4
0
        public virtual void CargarseGuardado(Casilla posicionBombita, Entidad ObstaculoDeSalida, List<Entidad> listaEntidades)
        {
            this.tablero.Reiniciar();
            this.tablero = new Tablero();

            this.bombita.Reiniciar();
            this.bombita = new Bombita();
            this.tablero.AgregarEntidad(bombita, posicionBombita.X, posicionBombita.Y);

            this.inicializarGuardado(ObstaculoDeSalida, listaEntidades);
        }
 public static void SetInstancia(Tablero tablero)
 {
     INSTANCIA = tablero;
 }
 // retorna la instancia de tablero
 public static Tablero GetInstancia()
 {
     if (INSTANCIA == null)
         INSTANCIA = new Tablero();
     return (INSTANCIA);
 }
 // inicializa los casilleros que compondran al tablero, en principio vacios
 private void InicializarCasillas()
 {
     for (int i = 0; i < MAXIMO_FILA; i++)
         for (int j = 0; j < MAXIMO_COLUMNA; j++)
            casillas [i, j] = new Casilla (i, j);
     INSTANCIA = this;
 }
 // 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 = null;
 }