예제 #1
0
파일: Game1.cs 프로젝트: tareaPOO/Proyecto
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            theMap = new BasicMap();
            theMap2 = new BasicMap();

            bob = new Bob();
            bob.LoadContent(Content);
            Rectangle temp = bob.Pos;
            temp.X = 100;
            temp.Y = 270;
            temp.Width = 100;
            temp.Height = 150;
            bob.Pos = temp;
            bob.SetMap(theMap);

            //Cactus
            cactus = new Cactus();
            cactus.LoadCac(Content);
            cactus.LoadLifes(Content);

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

            theMap2.LoadContent_Transitable(Content, "Transitable", 4080, -1);
            theMap2.LoadContent_Notransitable("NoTransitable", Content, 8972, 420);
            theMap2.SetIncrement(5);

            bob.setHeightLimits(graphics.GraphicsDevice.Viewport.Height);
            bob.setWidthLimits(graphics.GraphicsDevice.Viewport.Width);
        }
예제 #2
0
        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);
        }