コード例 #1
0
ファイル: Nivel1.cs プロジェクト: tareaPOO/VideoJuego
        public void LoadContent(ContentManager Content)
        {
            theMap = new BasicMap();
            theMap2 = new BasicMap();
            bob = new Bob();
            logo = new Logo();

            bob.LoadContent(Content);
            Rectangle temp = bob.Pos;
            temp.X = 100;
            temp.Y = 430;
            temp.Width = 140;
            temp.Height = 210;
            bob.Pos = temp;
            bob.SetMap(theMap);
            //Cactus

            cactus1 = new Cactus();
            cactus2 = new Cactus();
            cactus3 = new Cactus();

            cactus1.LoadConCactus1(Content);
            cactus2.LoadConCactus2(Content);
            cactus3.LoadConCactus3(Content);

            cactus1.LoadLifes(Content);
            cactus2.LoadLifes(Content);
            cactus3.LoadLifes(Content);

            cactus1.Cac(Content);
            cactus2.Cac(Content);
            cactus3.Cac(Content);

            //Mapas
            theMap.LoadContent_Transitable(Content, "Transitable", 0, -1);
            theMap.LoadContent_Notransitable("NoTransitable", Content, 0, 640);
            theMap.SetIncrement(14);

            theMap2.LoadContent_Transitable(Content, "Transitable", 4080, -1);
            theMap2.LoadContent_Notransitable("NoTransitable", Content, 9072, 640);
            theMap2.SetIncrement(14);

            //Logo
            logo.LoadContent(Content);
        }
コード例 #2
0
ファイル: Nivel2.cs プロジェクト: tareaPOO/VideoJuego
        public void LoadContent(ContentManager Content)
        {
            theMap = new BasicMap();
            theMap2 = new BasicMap();
            bob = new Bob();
            logo = new Logo();

            bob.LoadContent(Content);
            Rectangle temp = bob.Pos;
            temp.X = 100;
            temp.Y = 430;
            temp.Width = 140;
            temp.Height = 210;
            bob.Pos = temp;
            bob.SetMap(theMap);

            // Snakes

            snake1 = new Snakes();
            snake2 = new Snakes();
            snake3 = new Snakes();

            snake1.SnakesLoad(Content);
            snake1.Snak(Content);
            snake1.LoadLifes(Content);

            snake2.SnakesLoad2(Content);
            snake2.Snak(Content);
            snake2.LoadLifes(Content);

            snake3.SnakesLoad3(Content);
            snake3.Snak(Content);
            snake3.LoadLifes(Content);

            //Bats

            bat1 = new Bats();
            bat2 = new Bats();
            bat3 = new Bats();

            bat1.BatsLoad1(Content);
            bat1.TheBat(Content);
            bat1.LoadLifes(Content);

            bat2.BatsLoad2(Content);
            bat2.TheBat(Content);
            bat2.LoadLifes(Content);

            bat3.BatsLoad3(Content);
            bat3.TheBat(Content);
            bat3.LoadLifes(Content);

            //Mapas
            theMap.LoadContent_Transitable(Content, "TransitableCueva.png", 0, -1);
            theMap.LoadContent_Notransitable("NoTransitableCueva", Content, 0, 640);
            theMap.SetIncrement(14);

            theMap2.LoadContent_Transitable(Content, "TransitableCueva.png", 4080, -1);
            theMap2.LoadContent_Notransitable("NoTransitableCueva", Content, 9072, 640);
            theMap2.SetIncrement(14);

            //Logo
            logo.LoadContent(Content);
        }