MrGravity.WorldSelect.WorldSelect C# (CSharp) Method

WorldSelect() public method

Constructs the menu screen that allows the player to select a level
public WorldSelect ( IControlScheme controlScheme, GraphicsDeviceManager graphics ) : System
controlScheme IControlScheme Controls that the player are using
graphics GraphicsDeviceManager
return System
        public WorldSelect(IControlScheme controlScheme, GraphicsDeviceManager graphics)
        {
            _mControls = controlScheme;
            _mGraphics = graphics;

            CreateRegions();

            _mIcons = new Texture2D[6];

            _mLevels = new List<LevelInfo>();

            var levelList = "..\\..\\..\\Content\\Levels\\Info\\LevelList.xml";
            #if XBOX360
            mLevelInfo = XElement.Load(LEVEL_LIST.Remove(0,8));
            #else
            _mLevelInfo = XElement.Load(levelList);
            #endif
            DeviceSelected = false;

            _rand = new Random();
            _number = _rand.Next(4);

            _device = null;
            _loaded = false;
        }