Ejemplo n.º 1
0
 public virtual void LoadContentCactus3(ContentManager Content, String dirName, String name)
 {
     cactus3 = new BasicSprite();
     cactus3.LoadContent(Content, dirName, name);
 }
Ejemplo n.º 2
0
        //Cargar aqui los valores de los sprites de vivoras
        //Cargar aqui los valores de los sprites de murcielagos
        public virtual void LoadLifes(ContentManager Content)
        {
            Life0 = new BasicSprite();
            Life0.LoadContent(Content, "Life", "LifeCero");

            Life1 = new BasicSprite();
            Life1.LoadContent(Content, "Life", "LifeUno");

            Life2 = new BasicSprite();
            Life2.LoadContent(Content, "Life", "LifeDos");

            Life3 = new BasicSprite();
            Life3.LoadContent(Content, "Life", "LifeTres");

            GameOver = new BasicSprite();
            GameOver.LoadContent(Content, "Menu", "gameover");

            GObob = new BasicSprite();
            GObob.LoadContent(Content, "Menu", "GObob");

            Lifes = Life.Life3;
        }
Ejemplo n.º 3
0
 public virtual void LoadContent_StandRight(ContentManager Content, string dirName, String name)
 {
     standRight = new BasicSprite();
     direccion = SideDirection.Stand_Right;
     standRight.LoadContent(Content, dirName, name);
 }
Ejemplo n.º 4
0
 // Methods
 //Load content para imagenes estáticas (BasicSprite)
 public virtual void LoadContent_Jump(ContentManager Content, string dirName, String name)
 {
     jump = new BasicSprite();
     direccion = SideDirection.Jump;
     jump.LoadContent(Content, dirName, name);
 }
Ejemplo n.º 5
0
        //  BasicMap map;
        // Methods
        //LoadContent para cargar los cactus
        public virtual void Cactus(ContentManager Content, string dirName, String name, String name2, String name3)
        {
            Cactu = new ArrayList();

            myRandom = new Random();

            for (int k = 0; k < 20; k++)
            {
                cactus1 = new BasicSprite();
                cactus2 = new BasicSprite();
                cactus3 = new BasicSprite();

                cactus1.LoadContent(Content, dirName, name);
                cactus2.LoadContent(Content, dirName, name2);
                cactus3.LoadContent(Content, dirName, name3);

                nR = myRandom.Next(1, 4);

                if (nR == 1)
                {
                    Rectangle tempo = cactus1.Pos;
                    if (k == 0)
                        tempo.X = 350;
                    if (k >= 1)
                        tempo.X = (myRandom.Next(360, 400)) + (((BasicSprite)Cactu[(k - 1)]).Pos.X); //Se separan los cactus

                    tempo.Y = 330;
                    cactus1.Pos = tempo;
                    Cactu.Add(cactus1);
                }
                else
                     if (nR== 2)
                {
                    Rectangle tempo = cactus2.Pos;
                    if (k == 0)
                        tempo.X = 350;
                    if (k >= 1)
                        tempo.X = (myRandom.Next(360, 400)) + (((BasicSprite)Cactu[(k - 1)]).Pos.X); //Se separan los cactus

                    tempo.Y = 330;
                    cactus2.Pos = tempo;

                    Cactu.Add(cactus2);
                }

                     else
                         if (nR >= 3)
                         {
                             Rectangle tempo = cactus3.Pos;
                             if (k == 0)
                                 tempo.X = 350;
                             if (k >= 1)
                                 tempo.X = (myRandom.Next(360, 400)) + (((BasicSprite)Cactu[(k - 1)]).Pos.X); //Se separan los cactus

                             tempo.Y = 330;
                             cactus3.Pos = tempo;

                             Cactu.Add(cactus3);
                         }

                direccion = SideDirection.cac;
            }
        }
Ejemplo n.º 6
0
 public virtual void LoadContent_Crouch(ContentManager Content, string dirName, String name)
 {
     crouch = new BasicSprite();
     direccion = SideDirection.Crouch;
     crouch.LoadContent(Content, dirName, name);
 }
Ejemplo n.º 7
0
        public virtual void LoadLifes(ContentManager Content)
        {
            Life0 = new BasicSprite();
            Life0.LoadContent(Content, "Life", "Cero");

            Life1 = new BasicSprite();
            Life1.LoadContent(Content, "Life", "Uno");

            Life2 = new BasicSprite();
            Life2.LoadContent(Content, "Life", "Dos");

            Life3 = new BasicSprite();
            Life3.LoadContent(Content, "Life", "Tres");

            Lifes = Life.Life3;
        }