// 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); }
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(); }
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(); }
// retorna la instancia de tablero public static Tablero GetInstancia() { if (INSTANCIA == null) INSTANCIA = new Tablero(); return (INSTANCIA); }
// 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(); }
public void SetTablero(Tablero _tablero) { this.tablero = _tablero; }