本文整理汇总了C#中Sprite.DrawSolidColor方法的典型用法代码示例。如果您正苦于以下问题:C# Sprite.DrawSolidColor方法的具体用法?C# Sprite.DrawSolidColor怎么用?C# Sprite.DrawSolidColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sprite
的用法示例。
在下文中一共展示了Sprite.DrawSolidColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//.........这里部分代码省略.........
tileMap.position += window.JoystickAxisRight(0) * window.deltaTime * 300;
tileMap.Draw();
for (int i = 0; i < tiles2.Instances; i++)
{
tiles2.SetPosition(i, new Vector2(20 * i, 20 * i), true);
if (i % 2 == 0)
{
tiles2.SetAdditiveColor(i, new Vector4(1, -1, -1, 1), true);
}
}
tiles2.UpdatePositions();
tiles2.UpdateAdditiveColors();
ship.position.Y = 10;
ship.position += new Vector2(5f, 0) * window.deltaTime;
ship.scale = new Vector2(1f, 1f);
t += window.deltaTime;
if (t > 1f / 24f)
{
index++;
if (index >= 51)
index = 0;
t = 0;
}
int x = (index % 10) * (alien.Width / 10);
int y = (index / 10) * height;
ship.DrawTexture(alien, x, y, alien.Width / 10, height);
square.DrawSolidColor(1f, 0, 0, 0.5f);
window.SetClearColor(255, 0, 0);
window.RenderTo(screen);
logo.position.Y = 100;
logo.position += new Vector2(50f, 0) * window.deltaTime;
logo.scale = new Vector2(1f, 1f);
logo.DrawTexture(logoAiv);
if (window.GetKey(KeyCode.Esc))
break;
if (window.GetKey(KeyCode.F))
{
window.SetFullScreen(true);
window.SetResolution(1920, 1080);
}
if (window.GetKey(KeyCode.T))
{
window.Title = string.Format("Counter = {0}", counter++);
}
if (window.GetKey(KeyCode.R))
{
ship.SetAdditiveTint(1f, -1f, -1f, 0);
//ship.SetMultiplyTint(2f, 0, 0, 1);
}
if (window.GetKey(KeyCode.N))
{
ship.SetAdditiveTint(0, 0, 0, 0);