コード例 #1
0
        public override void Render(DwarfTime gameTime)
        {
            // Todo: This state should be rendering these, NOT the world manager.
            TipTimer.Update(gameTime);
            if (TipTimer.HasTriggered)
            {
                Tip.Text = LoadingTips[MathFunctions.Random.Next(LoadingTips.Count)];
                Tip.Invalidate();
            }

            EnableScreensaver = true;
            World.Render(gameTime);
            base.Render(gameTime);

            Runner.Render(Game.GraphicsDevice, DwarfGame.SpriteBatch, gameTime);
            GuiRoot.Draw();
        }
コード例 #2
0
ファイル: LoadState.cs プロジェクト: sodomon2/dwarfcorp
        public override void Render(DwarfTime gameTime)
        {
            TipTimer.Update(gameTime);
            if (TipTimer.HasTriggered)
            {
                var entry = Datastructures.SelectRandom(TutorialManager.EnumerateTutorials());

                Tip.Text = entry.Value.Title + "\n" + entry.Value.Text;
                Tip.Invalidate();
                TipTimer.Reset(10.0f);
            }

            EnableScreensaver = true;
            base.Render(gameTime);

            Runner.Render(Game.GraphicsDevice, DwarfGame.SpriteBatch, gameTime);
            GuiRoot.Draw();
        }
コード例 #3
0
        public override void Render(DwarfTime gameTime)
        {
            TipTimer.Update(gameTime);
            if (TipTimer.HasTriggered)
            {
                Tip.Text = LoadingTips[MathFunctions.Random.Next(LoadingTips.Count)];
                Tip.Invalidate();
            }

            EnableScreensaver = true;
            if (World != null)
            {
                World.Render(gameTime);
            }
            base.Render(gameTime);

            Runner.Render(Game.GraphicsDevice, DwarfGame.SpriteBatch, gameTime);
            GuiRoot.Draw();
        }