当前位置: 首页>>代码示例>>C#>>正文


C# Microsoft.Begin方法代码示例

本文整理汇总了C#中Microsoft.Begin方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Begin方法的具体用法?C# Microsoft.Begin怎么用?C# Microsoft.Begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft的用法示例。


在下文中一共展示了Microsoft.Begin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DrawSprite

        protected override void DrawSprite(Microsoft.Xna.Framework.Graphics.SpriteBatch batch)
        {
            batch.End();

            batch.Begin(SpriteSortMode.Immediate,
                        null, SamplerState.LinearWrap, null, null);
            batch.Draw(texture, Vector2.Zero,
                       new Rectangle(0, (int) Position.Y, Width, Height), Color.White);
            batch.End();
            batch.Begin();
        }
开发者ID:Vintharas,项目名称:WP7projects,代码行数:11,代码来源:Road.cs

示例2: Draw

 public void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
 {
     spriteBatch.End();
     spriteBatch.Begin();
     foreach (Star s in _Stars)
     {
         spriteBatch.Draw(_CloudTexture, s.Position, null, s.Color, 0, Vector2.Zero, s.Scale, SpriteEffects.None, 0);
     }
     spriteBatch.End();
     spriteBatch.Begin();
 }
开发者ID:boris2,项目名称:mmogameproject,代码行数:11,代码来源:background.cs

示例3: DrawWorld

        public override void DrawWorld(Microsoft.Xna.Framework.Graphics.SpriteBatch batch)
        {
            batch.Begin();
            nBuild.DrawLaser(batch, Screen.RelationToPosition(owner.Position), Screen.RelationToPosition(new Vector2(-Screen.X, owner.Position.Y)), lastHit, 0.05f * Screen.Height);

            batch.End();
        }
开发者ID:Kcanavrin,项目名称:tesseract,代码行数:7,代码来源:Laser.cs

示例4: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, PrimitiveDrawer primitiveDrawer, FontHandler fontHandler, Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice)
        {
            String text = mode ? "True" : "False";
            Color color = !GetSelected() ? colorA : colorB;

            Rectangle numRect = this.ToRectangle();
            numRect.Width = boolWidth;

            Rectangle rect = this.ToRectangle();

            this.width = (rect.Width = (int)fontHandler.GetVerdana().MeasureString(" " + text + " ").X + 3) + boolWidth;

            rect.X += boolWidth;
            primitiveDrawer.DrawRoundedRectangle(graphicsDevice, rect, color);
            primitiveDrawer.DrawRoundedRectangle(graphicsDevice, numRect, new Color(0x3D, 0x70, 0xBC));
            Vector2 vector = this.GetVector();

            vector.X += 3;
            vector.Y += 3;

            spriteBatch.DrawString(fontHandler.GetVerdana(), " Bool ", vector + TetrisGameRunner.GetOffsetVector(), Color.White);

            vector.X += boolWidth - 3;

            spriteBatch.DrawString(fontHandler.GetVerdana(), " " + text + " ", vector + TetrisGameRunner.GetOffsetVector(), Color.White);
            spriteBatch.End();
            spriteBatch.Begin();
        }
开发者ID:TheCreatorJames,项目名称:TajTetrisGame,代码行数:28,代码来源:BooleanDragDrop.cs

示例5: draw

 public override void draw(Microsoft.Xna.Framework.Graphics.GraphicsDevice _GraphicsDevice, Microsoft.Xna.Framework.Graphics.SpriteBatch _SpriteBatch)
 {
     _SpriteBatch.Begin();
     base.draw(_GraphicsDevice, _SpriteBatch);
     this.playerObject.draw(_GraphicsDevice, _SpriteBatch, Vector3.Zero, Color.White);
     _SpriteBatch.End();
 }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:7,代码来源:CharacterCreationMenu.cs

示例6: Draw

        public override void Draw(Microsoft.Xna.Framework.GameTime time, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
        {
            UIManager.Draw(time, spriteBatch);
            ActiveMap.WorldObjects.ForEach(
                obj => ((WorldCore.IDrawable)obj).Draw(time, spriteBatch));

            spriteBatch.End();

            // Draw Particles
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive);
            PhysicsManager.PSystems.ForEach(ps => ps.Draw());
            spriteBatch.End();
            // End Drawing Particles

            spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);
        }
开发者ID:tylermenezes,项目名称:ROIDS,代码行数:16,代码来源:Roids.cs

示例7: Draw

 public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch SB)
 {
     SB.Begin(SpriteSortMode.BackToFront, BlendState.NonPremultiplied);
     _Background.Draw(SB);
     Managers.EntityManager.Instance.Draw(SB);
     SB.End();
 }
开发者ID:ngzaharias,项目名称:1942,代码行数:7,代码来源:GameState.cs

示例8: DrawWorld

 public override void DrawWorld(Microsoft.Xna.Framework.Graphics.SpriteBatch batch)
 {
     batch.Begin();
     //batch.Draw(texture, Position, Color.Red);
     nBuild.nGon(batch, Screen.RelationToPosition(Position), 10, 3, (float)Math.Atan2(Velocity.Y, Velocity.X));
     batch.End();
 }
开发者ID:Kcanavrin,项目名称:tesseract,代码行数:7,代码来源:TrackingBullet.cs

示例9: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, PrimitiveDrawer primitiveDrawer, FontHandler fontHandler, Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice)
        {
            if(varLink != null)
            {
                Vector2 vec = this.GetVector();
                this.varLink.SetVector(ref vec);
                this.SetWidth(varLink.GetWidth());
                this.SetHeight(varLink.GetHeight());

                varLink.Draw(spriteBatch, primitiveDrawer, fontHandler, graphicsDevice);
            }
            else
            {
                primitiveDrawer.DrawRoundedRectangle(graphicsDevice, this, colorA);
                Vector2 ve = fontHandler.GetVerdana().MeasureString(this.typeOfVariable);

                this.width = (int)ve.X + 3;
                this.height = 30;

                Vector2 vec = this.GetVector();
                vec.Y += 3;
                vec.X += 3;

                spriteBatch.DrawString(fontHandler.GetVerdana(), this.typeOfVariable, vec + TetrisGameRunner.GetOffsetVector(), Color.White);
                spriteBatch.End();
                spriteBatch.Begin();
            }
        }
开发者ID:TheCreatorJames,项目名称:TajTetrisGame,代码行数:28,代码来源:DragDropVariablePlaceholder.cs

示例10: draw

        public override void draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice)
        {
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, publicStatics.spriteScale);
            //Background
            spriteBatch.Draw(Image.howToPlayMenu, new Rectangle(0, 0, publicStatics.screenSize.Width, publicStatics.screenSize.Height), Color.White);

            //Draw all labels
            for(int i = 0; i < labels.Count; i++)
            {
                labels[i].Draw(spriteBatch);
            }

            //Draw all Buttons
            for (int i = 0; i < buttons.Count; i++)
            {
                buttons[i].Draw(spriteBatch);
            }

            //Draw all Checkboxes
            for (int i = 0; i < checkboxes.Count; i++)
            {
                checkboxes[i].Draw(spriteBatch);
            }

            //Draw Mouse Cursor
            cursor.drawTexture(spriteBatch, graphicsDevice);
            spriteBatch.End();
        }
开发者ID:BenHamrick,项目名称:Heart-Attack-2013-Game-Jam,代码行数:28,代码来源:HowToPlay.cs

示例11: draw

        public override void draw(Microsoft.Xna.Framework.Graphics.GraphicsDevice _GraphicsDevice, Microsoft.Xna.Framework.Graphics.SpriteBatch _SpriteBatch)
        {
            _SpriteBatch.Begin(SpriteSortMode.Deferred,
                    BlendState.AlphaBlend, null, null, null, null,
                    GameLibrary.Camera.Camera.camera.getMatrix());

            if (GameLibrary.Camera.Camera.camera.Target != null)
            {
                GameLibrary.Model.Map.World.World.world.draw(_GraphicsDevice, _SpriteBatch, GameLibrary.Camera.Camera.camera.Target);
            }
            else
            {
                _SpriteBatch.DrawString(GameLibrary.Ressourcen.RessourcenManager.ressourcenManager.Fonts["Arial"], "Dein Charakter ist leider gestorben :(", new Vector2(50, 50), Color.White);
            }

            _SpriteBatch.End();

            if (this.inventoryMenu.IsActive)
            {
                this.inventoryMenu.checkItems();
            }

            _SpriteBatch.Begin();
            base.draw(_GraphicsDevice, _SpriteBatch);
            _SpriteBatch.End();
        }
开发者ID:Gothen111,项目名称:2DWorld,代码行数:26,代码来源:GameSurface.cs

示例12: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch pSpriteBatch)
        {
            pSpriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);

            pSpriteBatch.DrawString(m_pFont, "#", new Vector2(200, 50), Color.White);
            pSpriteBatch.DrawString(m_pFont, "Name", new Vector2(250, 50), Color.White);
            pSpriteBatch.DrawString(m_pFont, "Waves", new Vector2(500, 50), Color.White);
            pSpriteBatch.DrawString(m_pFont, "Play time", new Vector2(650, 50), Color.White);
            pSpriteBatch.DrawString(m_pFont, "Score", new Vector2(800, 50), Color.White);

            for (int i = 0; i < 10; i++)
            {
                pSpriteBatch.DrawString(m_pFont, (i + 1).ToString(), new Vector2(200, 100 + (i*30)), Color.White);
                pSpriteBatch.DrawString(m_pFont, m_pManager.List[i].PlayerName, new Vector2(250, 100 + (i * 30)), Color.White);
                pSpriteBatch.DrawString(m_pFont, m_pManager.List[i].Wave.ToString(), new Vector2(500, 100 + (i * 30)), Color.White);
                pSpriteBatch.DrawString(m_pFont, m_pManager.List[i].PlayTime.ToString()+" sec", new Vector2(650, 100 + (i * 30)), Color.White);
                pSpriteBatch.DrawString(m_pFont, m_pManager.List[i].Score.ToString(), new Vector2(800, 100 + (i * 30)), Color.White);

            }

            pSpriteBatch.Draw(Constants.BUTTON_B, new Vector2(1100, 600), Color.White);
            pSpriteBatch.DrawString(m_pFont, "Back", new Vector2(1050, 600), Color.White);

            pSpriteBatch.End();

            base.Draw(pSpriteBatch);
        }
开发者ID:zoral,项目名称:dangerzone,代码行数:27,代码来源:HighScoreScreen.cs

示例13: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, PrimitiveDrawer primitiveDrawer, FontHandler fontHandler, Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice)
        {
            Rectangle numRect = this.ToRectangle();
            numRect.Width = strWidth;

            Rectangle rect = this.ToRectangle();
            this.width = (rect.Width = (int)fontHandler.GetVerdana().MeasureString(" " + formatText(fontHandler) + " ").X + 3) + strWidth;
            rect.X += strWidth;

            if (this.text.Length > 0 || GetSelected())
                if (selected)
                {
                    primitiveDrawer.DrawRoundedRectangle(graphicsDevice, rect, colorB);
                }
                else
                {
                    primitiveDrawer.DrawRoundedRectangle(graphicsDevice, rect, colorA);
                }

            primitiveDrawer.DrawRoundedRectangle(graphicsDevice, numRect, storedColor);

            Vector2 vector = this.GetVector();

            vector.X += 3;

            vector.Y += 3;

            spriteBatch.DrawString(fontHandler.GetVerdana(), " Code ", vector + TetrisGameRunner.GetOffsetVector(), Color.White);

            vector.X += strWidth;

            spriteBatch.DrawString(fontHandler.GetVerdana(), " " + formatText(fontHandler) + " ", vector + TetrisGameRunner.GetOffsetVector(), Color.White);
            spriteBatch.End();
            spriteBatch.Begin();
        }
开发者ID:TheCreatorJames,项目名称:TajTetrisGame,代码行数:35,代码来源:CodeTextbox.cs

示例14: Draw

 public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch _spritebatch)
 {
     _spritebatch.Begin();
     this.m_lp_extractor.Draw(_spritebatch);
     base.Draw(_spritebatch);
     _spritebatch.End();
 }
开发者ID:luuthevinh,项目名称:yugioh-new-gen,代码行数:7,代码来源:HealthBar.cs

示例15: Draw

 public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch pSpriteBatch)
 {
     pSpriteBatch.Begin();
     pSpriteBatch.DrawString(m_pFont, "LOADING", new Microsoft.Xna.Framework.Vector2(100, 100), Color.White);
     pSpriteBatch.End();
     base.Draw(pSpriteBatch);
 }
开发者ID:zoral,项目名称:dangerzone,代码行数:7,代码来源:LoadingScreen.cs


注:本文中的Microsoft.Begin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。