本文整理汇总了C#中IGraphics.SetColor方法的典型用法代码示例。如果您正苦于以下问题:C# IGraphics.SetColor方法的具体用法?C# IGraphics.SetColor怎么用?C# IGraphics.SetColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGraphics
的用法示例。
在下文中一共展示了IGraphics.SetColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Smoke, drawX, drawY, 32, 32, animation / 4, animation % 4, angle);
}
示例2: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, r, g, b);
graphics.DrawObject(Image.BigExplosion, drawX, drawY, 64, 64, animation / 4, animation % 4, angle);
}
示例3: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Mushi, drawX, drawY, 32, 64, type, animation % 3 == 1 ? 1 : 0, angle);
}
示例4: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawBullet(Image.Bullet, drawX, drawY, 16, 16, 0, 0, Angle);
}
示例5: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.RedEnemy, drawX, drawY, 32, 32, 0, 0, angle);
}
示例6: Draw
public void Draw(IGraphics g)
{
if (Font != null) {
g.SetFont (Font);
}
g.SetColor (Colors.Gray);
var border = Frame;
border.Y += PaddingTop;
border.Height -= PaddingTop + PaddingBottom;
border.Inflate (-1, -1);
g.DrawRoundedRect (border, 5, 1);
var inner = border;
inner.Inflate (-2, -2);
if (Checked) {
g.FillRoundedRect (inner, 3);
g.SetColor (Colors.Black);
}
if (!string.IsNullOrEmpty (Title)) {
var fm = g.GetFontMetrics ();
var sw = fm.StringWidth (Title);
g.DrawString (Title, inner.X + (inner.Width - sw)/2, inner.Y + (inner.Height - fm.Height)/2);
}
}
示例7: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, type == 0 ? 255 : 0, type == 1 ? 255 : 0, type == 2 ? 255 : 0);
graphics.DrawObject(Image.Teki, drawX, drawY, 32, 32, 0, 0, angle);
}
示例8: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Clipper, drawX, drawY, 32, 32, 1, 0, 0);
}
示例9: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
int a = 15 - animation;
graphics.SetColor(255, type != 0 ? 255 : 128, type == 2 ? 255 : 128, type == 0 ? 255 : 128);
graphics.DrawObject(Image.BigExplosion, drawX, drawY, 64, 64, a / 4, a % 4, angle);
}
示例10: DrawBackground
public override void DrawBackground(IGraphics graphics)
{
graphics.SetColor(255, 255, 255, 255);
for (int i = -1; i < 16; i++)
{
graphics.DrawBackground(Image.Background3, 0, scroll % 32 + i * 32, 512, 32, 0, 0, BackgroundStretch);
}
}
示例11: Draw
public void Draw(IGraphics graphics)
{
if (ticks < 445)
{
graphics.SetColor(255, 0, 0, 0);
graphics.Fill();
graphics.EnableAddBlend();
for (int i = 0; i < CIRCLE_COUNT; i++)
{
int drawX = (int)Math.Round(circleX[i]) - CIRCLE_RADIUS;
int drawY = (int)Math.Round(circleY[i]) - CIRCLE_RADIUS;
switch (i % 3)
{
case 0:
graphics.SetColor(255, 32, 0, 0);
break;
case 1:
graphics.SetColor(255, 0, 32, 0);
break;
case 2:
graphics.SetColor(255, 0, 0, 32);
break;
}
graphics.DrawImage(Image.Circle, drawX, drawY);
}
graphics.DisableAddBlend();
graphics.SetColor(255, 255, 255, 255);
graphics.DrawString("TOP SCORES", (640 - 10 * 16) / 2, 48);
graphics.DrawString(" RANK SCORE LEVEL PLAYER ", 0, 80);
for (int i = 0; i < 10; i++)
{
graphics.DrawString(RANK[i], 40, i * 32 + 112);
{
string s = top10Players[i].Score.ToString();
int drawX = 128 + (7 - s.Length) * 16;
graphics.DrawString(s, drawX, i * 32 + 112);
}
{
string s = top10Players[i].Level.ToString();
int drawX = 296 + (2 - s.Length) * 16;
graphics.DrawString(s, drawX, i * 32 + 112);
}
graphics.DrawString(top10Players[i].Name, 480, i * 32 + 112);
}
}
else
{
graphics.SetColor(255, 128, 128, 128);
graphics.Fill();
graphics.SetColor(255, 255, 255, 255);
graphics.DrawImage(Image.Yome, 64, -16, 128, 128, 0, 0, 0, 4);
}
}
示例12: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
for (int i = 0; i < message.Length; i++)
{
int targetX = drawX - message[i].Length * 8;
int targetY = drawY - message.Length * 8 + i * 16;
graphics.DrawString(message[i], targetX, targetY);
}
}
示例13: Draw
public override void Draw(IGraphics graphics)
{
if (isDead)
{
return;
}
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.Player, drawX, drawY, 32, 32, 0, 0, 0);
if (warpSpeed > 8)
{
graphics.EnableAddBlend();
int phase = Game.Ticks % 3;
for (int i = 0; i < 11; i++)
{
graphics.SetColor(255, (i + phase) % 3 == 0 ? 255 : 0, (i + phase) % 3 == 1 ? 255 : 0, (i + phase) % 3 == 2 ? 255 : 0);
graphics.DrawObject(Image.Player, drawX, drawY + i * 48 + phase * 16, 32, 32, 0, 0, 0);
}
graphics.DisableAddBlend();
}
}
示例14: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.OrangeEnemy, drawX, drawY, 32, 32, 0, 0, angle);
if (damaged)
{
graphics.EnableAddBlend();
graphics.DrawObject(Image.OrangeEnemy, drawX, drawY, 32, 32, 0, 0, angle);
graphics.DisableAddBlend();
}
}
示例15: Draw
public override void Draw(IGraphics graphics)
{
int drawX = (int)Math.Round(X);
int drawY = (int)Math.Round(Y);
graphics.SetColor(255, 255, 255, 255);
graphics.DrawObject(Image.LastBoss, drawX, drawY, 64, 64, 0, animation / 2, 0);
if (damaged)
{
graphics.EnableAddBlend();
graphics.DrawObject(Image.LastBoss, drawX, drawY, 64, 64, 0, animation / 2, 0);
graphics.DisableAddBlend();
}
}