コード例 #1
0
        public override void DrawGUI(float deltaTime, SpriteBatch spriteBatch)
        {
            DebugConsole.Draw(deltaTime, spriteBatch);

            foreach (var component in guiComponents)
            {
                component.Draw(deltaTime, spriteBatch);
            }
        }
コード例 #2
0
ファイル: IOTestCase.cs プロジェクト: EpicTofuu/Sh.Framework
        public override void Draw(SpriteBatch spritebatch)
        {
            txtWrite.Draw(spritebatch);
            txtRead.Draw(spritebatch);
            xmlWrite.Draw(spritebatch);
            xmlRead.Draw(spritebatch);

            console.Draw(spritebatch);
            base.Draw(spritebatch);
        }
コード例 #3
0
        public override void Draw(SpriteBatch spritebatch)
        {
            commentConsole.Draw(spritebatch);
            warningConsole.Draw(spritebatch);
            errorConsole.Draw(spritebatch);
            fatalConsole.Draw(spritebatch);
            wipeConsole.Draw(spritebatch);
            writeConsole.Draw(spritebatch);

            dbconsole.Draw(spritebatch);
            base.Draw(spritebatch);
        }
コード例 #4
0
        public override void Draw(SpriteBatch spritebatch)
        {
            bg.Draw(spritebatch);

            foreach (GameObject t in tiles)
            {
                t.Draw(spritebatch);
            }

            foreach (GameObject g in deco)
            {
                g.Draw(spritebatch);
            }

            foreach (GameObject g in pickups)
            {
                g.Draw(spritebatch);
            }

            foreach (Trigger t in triggers)
            {
                t.Draw(spritebatch);
            }

            foreach (Danmaku d in projectiles)
            {
                d.Draw(spritebatch);
            }

            foreach (Enemy e in enemies)
            {
                e.Draw(spritebatch);
            }

            boss.Draw(spritebatch);
            player.Draw(spritebatch);

            hud.Draw(spritebatch);
            sm.Draw(spritebatch);

            attackoverlay.Draw(spritebatch);

            manager.Draw(spritebatch);

#if !RELEASE
            console.Draw(spritebatch);
#endif

            base.Draw(spritebatch);
        }
コード例 #5
0
        /// <summary>
        ///     Renders UI Components to screen.
        /// </summary>
        public void Render(FrameEventArgs e)
        {
            foreach (var component in _components)
            {
                component.Draw();
            }

            if (_console.Visible)
            {
                _console.Draw();
            }

            if (showCursor)
            {
                _cursorSprite = DragInfo.DragSprite != null && DragInfo.IsActive
                    ? DragInfo.DragSprite
                    : _resourceCache.GetSprite("cursor");

                _cursorSprite.Position = MousePos;
                _cursorSprite.Draw();
            }
        }
コード例 #6
0
        public override void DrawScene(GameTime gameTime)
        {
            #region Debug
            DebugConsole.Update();
            #endregion

            #region Scripts
            if (!_Interface.IsInterfaceBlocking())
            {
                _Service.CheckParallelProcessAndAutomaticAndContactScripts(_ProjectData.Resolution.MatrixPrecision);
                ScriptManager.RunParallelScripts();
                ScriptManager.RunScript(ScriptManager.CurrentScript, false);
            }

            if (ScriptManager.GoToScreen != null && !_LaunchedEndingScripts)
            {
                LaunchEndingScript();
            }

            if (ScriptManager.GameOver)
            {
                VO_RunningScript runningScript = new VO_RunningScript();
                runningScript.Id            = _ProjectData.GameOver.Id;
                runningScript.Lines         = _ProjectData.GameOver.Lines;
                ScriptManager.CurrentScript = runningScript;
                ScriptManager.GameOver      = false;
            }
            #endregion

            _SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, null, null, null, null, Camera2D.GetTransformation(this.GraphicsDevice));
            #region Décors et objets derrière perso
            int i = 1;
            _Stage.ListCharacters.OrderBy(p => p.Location.Y);
            int playerLayerIndex = _Service.GetLayerIndexFromCharacterLocation(PlayableCharactersManager.CurrentPlayerCharacter.CharacterSprite.Location);
            foreach (VO_Layer layer in _Stage.ListLayers)
            {
                RefreshLayer(layer, layer.MainLayer, !_Interface.IsInterfaceBlocking());
                RefreshCharacters(i, layer.MainLayer, playerLayerIndex, !_Interface.IsInterfaceBlocking());
                i++;
            }
            #endregion
            _SpriteBatch.End();

            _SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
            #region Interface
            if (ScriptManager.ScriptUserControls)
            {
                _Interface.Draw(gameTime, ScriptManager.BlockType);
            }
            #endregion
            #region Messages
            if (!_Interface.IsInterfaceBlocking())
            {
                RefreshMessage(ScriptManager.CurrentScript);
                RefreshChoiceMessage(ScriptManager.CurrentScript, gameTime);
                if (ScriptManager.ParallelScripts != null)
                {
                    foreach (VO_RunningScript script in ScriptManager.ParallelScripts)
                    {
                        RefreshMessage(script);
                    }
                }
            }
            #endregion
            #region Debug
            DebugConsole.Draw();
            #endregion
            _SpriteBatch.End();
        }