Ejemplo n.º 1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            camera = new Camera2D(GraphicsDevice.Viewport);
            mouse  = new GameMouse(Content);

            GameObject.Initialize(Content, graphics, camera, mouse, this);

            sm = new SceneManager(this, new SceneMainMenu());

            base.Initialize();
        }
Ejemplo n.º 2
0
        public static void Initialize(ContentManager content, GraphicsDeviceManager graphics, Camera2D camera, GameMouse mouse, Game1 game)
        {
            Content  = content;
            Graphics = graphics;
            Camera   = camera;
            Mouse    = mouse;
            Game1    = game;

            BlankPixel  = Content.Load <Texture2D>("blankPixel");
            Spritesheet = Content.Load <Texture2D>("spritesheet");

            FontSmall  = Content.Load <SpriteFont>("fonts/roboto/RegularSmall");
            FontMedium = Content.Load <SpriteFont>("fonts/roboto/RegularMedium");
            FontLarge  = Content.Load <SpriteFont>("fonts/silkscreen/large");
            FontTiny   = Content.Load <SpriteFont>("fonts/silkscreen/tiny");
            Font15     = Content.Load <SpriteFont>("fonts/silkscreen/font15");
        }