loadContent() public method

public loadContent ( Microsoft.Xna.Framework.Content.ContentManager content, string filename ) : void
content Microsoft.Xna.Framework.Content.ContentManager
filename string
return void
コード例 #1
0
ファイル: WorldManager.cs プロジェクト: ErraticUnicorn/MOSH
        public static void loadMaps(ContentManager p_content)
        {
            m_rooms = new Dictionary<PlaceID, Room>();

            // there's probably a way to do this using loops but listing everything out is safer
            Room bathroom = new Bathroom();
            Room cafeteria = new Cafeteria();
            Room computerLab = new ComputerLab();
            Room entrance = new MainEntrance();
            Room hallwayEast = new HallwayEast();
            Room hallwayWest = new HallwayWest();
            Room library = new Library();
            Room magazineOffice = new MagazineOffice();
            Room math = new MathClassroom();
            Room science = new ScienceClassroom();
            Room studentLounge = new StudentLounge();
            Room footballField = new FootballField();
            //Room questHall = new Room();
            //Room questHallEnd = new Room();

            bathroom.loadContent(p_content, Directories.MAPS + "map_Bathroom");
            cafeteria.loadContent(p_content, Directories.MAPS + "map_Cafeteria");
            computerLab.loadContent(p_content, Directories.MAPS + "map_ComputerLab");
            entrance.loadContent(p_content, Directories.MAPS + "map_Entrance");
            hallwayEast.loadContent(p_content, Directories.MAPS + "map_HallwayEast");
            hallwayWest.loadContent(p_content, Directories.MAPS + "map_HallwayWest");
            library.loadContent(p_content, Directories.MAPS + "map_Library");
            magazineOffice.loadContent(p_content, Directories.MAPS + "map_MagazineOffice");
            math.loadContent(p_content, Directories.MAPS + "map_Math");
            science.loadContent(p_content, Directories.MAPS + "map_Science");
            studentLounge.loadContent(p_content, Directories.MAPS + "map_StudentLounge");
            footballField.loadContent(p_content, Directories.MAPS + "footballfielddraft");
            //questHall.loadContent(p_content, "map_longhallwaymission");
            //questHallEnd.loadContent(p_content, "map_longhallwayend");

            m_rooms.Add(PlaceID.Bathroom, bathroom);
            m_rooms.Add(PlaceID.Cafeteria, cafeteria);
            m_rooms.Add(PlaceID.ComputerLab, computerLab);
            m_rooms.Add(PlaceID.Entrance, entrance);
            m_rooms.Add(PlaceID.HallwayEast, hallwayEast);
            m_rooms.Add(PlaceID.HallwayWest, hallwayWest);
            m_rooms.Add(PlaceID.Library, library);
            m_rooms.Add(PlaceID.MagazineOffice, magazineOffice);
            m_rooms.Add(PlaceID.Math, math);
            m_rooms.Add(PlaceID.Science, science);
            m_rooms.Add(PlaceID.StudentLounge, studentLounge);
            m_rooms.Add(PlaceID.FootballField, footballField);
            //m_rooms.Add("map_longhallwaymission", questHall);
            //m_rooms.Add("map_longhallwayend", questHallEnd);

            m_currentRoom = m_rooms[PlaceID.StudentLounge];
            m_currentRoomID = PlaceID.HallwayWest;
        }