Beispiel #1
0
        /// <summary>
        ///     LoadContent will be called once per game and is the place to load
        ///     all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            Settings    = new GameSettings(this);
            SpriteBatch = new SpriteBatch(GraphicsDevice);
            Sounds.LoadContent();
            Pixel = new Texture2D(GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
            Pixel.SetData(new[] { Color.White });

            MouseInput    = new MouseInput();
            TouchInput    = new TouchInput();
            UnifiedInput  = new UnifiedInput(this);
            KeyboardInput = new KeyboardInput(this);
            UnifiedInput.TapListeners.Add(t => Arena?.OnTap(t));

            Levels.Levels.LoadContent(Content);
            Fonts.LoadContent(Content);
            Textures.LoadContent(Content);
            Sprites.LoadContent(this, Content);
            Starfield  = new Starfield(100, ArenaArea);
            PauseArena = new PauseArena(this);
            Arena      = new MenuArena(this);
            Arena.Initialise();
        }