本文整理汇总了C#中OpenRA.Graphics.WorldRenderer.DrawRangeCircleWithContrast方法的典型用法代码示例。如果您正苦于以下问题:C# WorldRenderer.DrawRangeCircleWithContrast方法的具体用法?C# WorldRenderer.DrawRangeCircleWithContrast怎么用?C# WorldRenderer.DrawRangeCircleWithContrast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenRA.Graphics.WorldRenderer
的用法示例。
在下文中一共展示了WorldRenderer.DrawRangeCircleWithContrast方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawRangeCircle
public static void DrawRangeCircle(WorldRenderer wr, WPos pos, int range, Color color)
{
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, color),
wr.ScreenPxPosition(pos),
range,
Color.FromArgb(96, Color.Black));
}
示例2: DrawRangeCircle
public static void DrawRangeCircle(WorldRenderer wr, WPos pos, int range, Color color)
{
wr.DrawRangeCircleWithContrast(
pos,
WRange.FromCells(range),
Color.FromArgb(128, color),
Color.FromArgb(96, Color.Black)
);
}
示例3: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr)
{
if (self.Owner != self.World.LocalPlayer)
return;
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Color.LimeGreen),
wr.ScreenPxPosition(self.CenterPosition), self.Info.Traits.Get<DetectCloakedInfo>().Range,
Color.FromArgb(96, Color.Black));
}
示例4: RenderAfterWorld
// Range circle
public void RenderAfterWorld(WorldRenderer wr)
{
// Visible to player and allies
if (!ValidRenderPlayer())
return;
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Ready() ? Color.White : Color.Red),
wr.ScreenPxPosition(self.CenterPosition), Info.Range,
Color.FromArgb(96, Color.Black));
}
示例5: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr)
{
if (self.Owner != self.World.LocalPlayer)
return;
wr.DrawRangeCircleWithContrast(
self.CenterPosition,
self.Info.Traits.Get<CreatesShroudInfo>().Range,
Color.FromArgb(128, Color.Cyan),
Color.FromArgb(96, Color.Black)
);
}
示例6: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr)
{
if (self.Owner != self.World.LocalPlayer)
return;
// Hack: Convert world coords to cells
var pxRange = self.Trait<AttackBase>().GetMaximumRange().Range / 1024f;
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Color.Yellow),
wr.ScreenPxPosition(self.CenterPosition), pxRange,
Color.FromArgb(96, Color.Black));
}
示例7: Render
public void Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition)
{
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Color.Cyan),
wr.ScreenPxPosition(centerPosition),
ai.Traits.Get<CreatesShroudInfo>().Range,
Color.FromArgb(96, Color.Black));
foreach (var a in w.ActorsWithTrait<RenderShroudCircle>())
if (a.Actor.Owner == a.Actor.World.LocalPlayer)
a.Trait.RenderAfterWorld(wr);
}
示例8: Render
public void Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition)
{
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Color.Yellow), wr.ScreenPxPosition(centerPosition),
ai.Traits.WithInterface<ArmamentInfo>()
.Select(a => Rules.Weapons[a.Weapon.ToLowerInvariant()].Range).Max(),
Color.FromArgb(96, Color.Black));
foreach (var a in w.ActorsWithTrait<RenderRangeCircle>())
if (a.Actor.Owner == a.Actor.World.LocalPlayer)
if (a.Actor.Info.Traits.Get<RenderRangeCircleInfo>().RangeCircleType == RangeCircleType)
a.Trait.RenderAfterWorld(wr);
}
示例9: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr, World world)
{
if (!self.IsInWorld || self.Owner != self.World.LocalPlayer)
return;
if (!self.Trait<PortableChrono>().Info.HasDistanceLimit)
return;
wr.DrawRangeCircleWithContrast(
self.CenterPosition,
WRange.FromCells(self.Trait<PortableChrono>().Info.MaxDistance),
Color.FromArgb(128, Color.LawnGreen),
Color.FromArgb(96, Color.Black)
);
}
示例10: RenderBeforeWorld
// Range circle
public void RenderBeforeWorld(WorldRenderer wr, Actor self)
{
// Visible to player and allies
if (!self.Owner.IsAlliedWith(self.World.RenderPlayer))
return;
wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Ready() ? Color.White : Color.Red),
self.CenterLocation.ToFloat2(), Info.Range,
Color.FromArgb(96, Color.Black), 1);
}