示例#1
0
 public void Explotar(GameTime Time)
 {
     Explosion = new MotorAnimacion(Content, "Efectos/explo", 3);
     Explosion.CambiarTiempo(0.10f);
     Vivo = false;
     Listo = false;
 }
示例#2
0
 public Item(ContentManager Content,string Path, int Cantidad, Vector2 Pos)
 {
     Animador = new MotorAnimacion(Content, Path, Cantidad);
     posicionLog = Pos;
     Texture2D Aux = Content.Load<Texture2D>(Path + "0");
     AnchoItem = Aux.Width;
     LargoItem = Aux.Height;
 }
示例#3
0
        protected Menu(ContentManager Content, string PathA, string PathB,int Cantidad)
        {
            SplashImage = Content.Load<Texture2D>(PathA);

            SplashAnimado = new MotorAnimacion(Content, PathB, Cantidad);
            Animacion = true;
            DatosImagen = new Vector2(SplashImage.Width / 4, SplashImage.Height / 4);
        }
示例#4
0
        public Enemigos(Game game, Vector2[] Patrulla)
        {
            Ruta=Patrulla;
            posicionLog = Ruta[0];
            Vivo = true;
            vida = 20;

            Content = game.Content;

            direccion=0;
            index = 0;
            Animador = new MotorAnimacion(game.Content, "Personaje/Enemigos/Nivel1/Imagenes/ENE", 17);
            VelMov = 4f;

            TiempoMovimiento = 0f;
            TiempoTotal = 0;
        }
示例#5
0
        public Jugador(Game game)
        {
            LLave = false;

            vida = 100;
            direccion = 0;
            VelMov = 4f;

            Animador = new MotorAnimacion(game.Content, "Personaje/Jugador/JJ", 17);

            int i, j;
            i = 0;

            string path = game.Content.RootDirectory + "/Nivel/Nivel1.txt";
            using (StreamReader tr = new StreamReader(path))
            {
                string line = tr.ReadLine();

                while (line != null)
                {
                    j = 0;
                    foreach (char c in line)
                    {

                        if (c == '2')
                        {
                            posicionLog = new Vector2(j * TamanoCelda, i * TamanoCelda);
                            posicionDib = new Vector2(j * TamanoCelda, i * TamanoCelda);
                            break;
                        }
                        if (c != ' ')
                            j++;
                    }

                    line = tr.ReadLine();
                    i++;
                }
            }
        }
示例#6
0
 protected Menu(ContentManager Content, string PathB, int Cantidad)
 {
     SplashAnimado = new MotorAnimacion(Content, PathB, Cantidad);
     Animacion = true;
     DatosImagen = Vector2.Zero;
 }