Example #1
0
 public Juego(Jugador protagonista, Sprite fondo, Sprite dialogo)
 {
     r                 = new Random();
     bucle             = true;
     this.protagonista = protagonista;
     font18            = new Font("data/Joystix.ttf", 18);
     this.fondo        = fondo;
     this.dialogo      = dialogo;
     mapa              = new Mapa();
     mapa.CargarMapa("data/mapa.txt");
     dibujarDialogo = false;
     bgSound        = new Sound("data/sonidos/fondo.mp3");
     bgSound.BackgroundPlay();
 }
Example #2
0
 public NuevaPartida()
 {
     nombreIntroducido = false;
     generoIntroducido = false;
     bg     = new Image("data/menu_partidas.png");
     bg2    = new Image("data/menu_seleccion_sprite.jpg");
     font24 = new Font("data/Joystix.ttf", 30);
     string[] leer = File.ReadAllLines("partidas/listaPartidas.txt");
     nombrePJ       = " ";
     indiceGenero   = 0;
     posicionFlecha = 300;
     genero         = "Hombre";
     CargarNombres(ref listaNombres);
     errorNombre = "El nombre no puede estar vacio";
     cargarMapa  = new Mapa();
     cargarMapa.CargarMapa("data/mapa.txt");
 }
Example #3
0
 public CargarPartida()
 {
     bg             = new Image("data/menu_partidas.png");
     font24         = new Font("data/Joystix.ttf", 20);
     seleccion      = 1;
     posicionFlecha = 200;
     partidaElegida = false;
     cargarMapa     = new Mapa();
     cargarMapa.CargarMapa("data/mapa.txt");
     CargarNombres(ref listaNombres);
     try
     {
         maxOpciones = listaNombres.Count;
     }
     catch (Exception e)
     {
         maxOpciones = 0;
     }
 }