protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); _halfScreen = new Vector2(Graphics.PreferredBackBufferWidth / 2f, Graphics.PreferredBackBufferHeight / 2f); _circleTexture = Content.Load <Texture2D>("Circle"); _cursorTexture = Content.Load <Texture2D>("cursor"); _nameFont = Content.Load <SpriteFont>("BoxFont"); _chatFont = Content.Load <SpriteFont>("BoxFont"); _tileset = Content.Load <Texture2D>("Tileset"); _redPixel = Content.Load <Texture2D>("RedPixel"); _chatTextBox = new TextBox(Content.Load <Texture2D>("TextBox"), Content.Load <Texture2D>("Caret"), _chatFont) { X = 0, Y = 0, Width = 300 }; GameStateManager.ChangeState(new MainMenuGameState(this)); //EmptyKeys SpriteFont font = Content.Load <SpriteFont>("Segoe_UI_15_Bold"); FontManager.DefaultFont = Engine.Instance.Renderer.CreateFont(font); _mainMenuRoot = new MainMenuRoot(); _mainMenuRoot.DataContext = new MainMenuRootViewModel(); FontManager.Instance.LoadFonts(Content); }
void Awake() { singleton = this; }