Exemple #1
0
 protected override void LoadContent()
 {
     Desktop.HasExternalTextInput = true;
     Fonts.Load(Content);
     DrawerManager.Load();
     // SceneManager.Load(new SplashScene(), throwException: false);
     SceneManager.Load(new CharacterScene(), throwException: false);
     base.LoadContent();
 }
Exemple #2
0
        public GameContext(ITextureGenerator textureManager)
        {
            Envir.Game             = this;
            Envir.Device           = new GraphicsDeviceManager(this);
            Envir.TextureGenerator = textureManager;

            Content.RootDirectory = "Content";
            IsFixedTimeStep       = Config.FPSCap;
            MyraEnvironment.Game  = this;

#if WINDOWS || LINUX
            IsMouseVisible    = true;
            Window.TextInput += Window_TextInput;
#endif

            DrawerManager.Initialize();
        }
Exemple #3
0
        protected override void Draw(GameTime gameTime)
        {
            WidgetAnimation.Time = gameTime;

            DrawerManager.Clear(Color.Black);

            Desktop.RenderVisual();

            var debugLabel = $"FPS: {FPS} - UPS: {UPS}";

            using (var ctx = DrawerManager.PrepareSpriteBatch())
                ctx.Instance.DrawString(Fonts.Size8, debugLabel, new Vector2(10, 10), Color.White);

            base.Draw(gameTime);

            _fpsCounter++;
        }