Exemple #1
0
 public Nave()
 {
     fisica = Physics.Instance;
     random = new Random();
     direccion = calculaDireccion();
     textura = Properties.TexturaNave;
 }
Exemple #2
0
        public Juego(Texture2D back, Texture2D rect, Main main)
        {
            this.main = main;
            clickableElements = new List<Button>();
            this.back = back;
            this.rect = rect;
            fisica = Physics.Instance;
            nave = new Nave();
            /****GUI****/
            addButton(Properties.SCREEN_WITH - 240 + 0, 10, 50, 50, Properties.texturaBotonHome, 1);
            addButton(Properties.SCREEN_WITH - 240 + 80, 10, 50, 50, Properties.texturaBotonReload, 2);
            addButton(Properties.SCREEN_WITH - 240 + 160, 10, 50, 50, Properties.texturaBotonAyuda, 3);
            posMouse = new Vector2(Properties.SCREEN_WITH/2, Properties.SCREEN_HEIGHT/2);
            parallax_1 = Properties.parallax_1;
            parallax_2 = Properties.parallax_2;
            parallax_3 = Properties.parallax_3;

            /*** Parallax ***/
            posFondo_1 = 0;

            loadXML();
        }