本文整理汇总了C#中Microsoft.End方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.End方法的具体用法?C# Microsoft.End怎么用?C# Microsoft.End使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.End方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
示例2: 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();
}
示例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();
}
示例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();
}
示例5: 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();
}
示例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);
}
示例7: 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);
}
示例8: 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();
}
}
示例9: Draw
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch _spritebatch)
{
_spritebatch.Begin();
this.m_lp_extractor.Draw(_spritebatch);
base.Draw(_spritebatch);
_spritebatch.End();
}
示例10: 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();
}
示例11: 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);
}
示例12: 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.pauseMenu, 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 Bullet Points
if (buttons[0].mouseHover())
spriteBatch.Draw(imageRBC, new Rectangle(publicStatics.screenSize.Center.X - (int)(Font.cooper48.MeasureString("Resume").X / 2) - 52, publicStatics.screenSize.Center.Y - 36, 48, 48), Color.White);
if (buttons[1].mouseHover())
spriteBatch.Draw(imageRBC, new Rectangle(publicStatics.screenSize.Center.X - (int)(Font.cooper48.MeasureString("Main Menu").X / 2) - 52, publicStatics.screenSize.Center.Y - 26 + 90, 48, 48), Color.White);
//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();
}
示例13: Draw
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch Sb, Graphics.PrimitiveRenderer Pr)
{
StringBuilder str = new StringBuilder();
if (Left.Damage == Right.Damage)
str.AppendLine("Draw!");
else {
str.Append("Winrar: ");
if (Left.Damage < Right.Damage)
str.AppendLine("Player 1!");
else
str.AppendLine("Player 2!");
}
str.AppendLine("Press Enter to return to track select...");
Sb.Begin();
Sb.DrawString(sysFont, str, resultsTextPosition, Color.White);
str.Clear();
str.AppendLine("Player 1\n");
str.AppendFormat("Result score: {0}\n", Left.Score);
str.AppendFormat("Final health: {0}\n", Left.Health);
str.AppendFormat("Damage dealt: {0}\n", Left.Damage);
Sb.DrawString(sysFont, str, LeftResultPosition, Color.White);
str.Clear();
str.AppendLine("Player 2\n");
str.AppendFormat("Result score: {0}\n", Right.Score);
str.AppendFormat("Final health: {0}\n", Right.Health);
str.AppendFormat("Damage dealt: {0}\n", Right.Damage);
Sb.DrawString(sysFont, str, RightResultPosition, Color.White);
Sb.End();
}
示例14: 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();
}
示例15: 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();
}