本文整理匯總了C#中Microsoft.Xna.Framework.Graphics.Sprite.Fill方法的典型用法代碼示例。如果您正苦於以下問題:C# Sprite.Fill方法的具體用法?C# Sprite.Fill怎麽用?C# Sprite.Fill使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.Xna.Framework.Graphics.Sprite
的用法示例。
在下文中一共展示了Sprite.Fill方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Wall
public Wall(Vector2 Position, int Width, int Height)
{
rect = new Rect(Width, Height, false);
rect.Position = Position;
rect.IgnoreGravity = true;
image = new Sprite(Position);
image.Texture = new Texture2D(XNAGame.I.GraphicsDevice, Width, Height);
image.Fill(Color.LimeGreen);
}
示例2: Particle
public Particle(ParticleEmitter Engine, Texture2D Image, Vector2 Position, Vector2 Velocity, int Life)
{
engine = Engine;
position = Position;
velocity = Velocity;
if (Life < 0) { life = 0; }
else { life = Life; }
image = new Sprite();
image.Position = Position;
if (Image == null)
{
image.Texture = new Texture2D(XNAGame.Instance.GraphicsDevice, 5, 5);
image.Fill(Color.White);
}
else
{ image.Texture = Image; }
}