本文整理汇总了C#中OpenRA.Graphics.WorldRenderer.DrawSelectionBox方法的典型用法代码示例。如果您正苦于以下问题:C# WorldRenderer.DrawSelectionBox方法的具体用法?C# WorldRenderer.DrawSelectionBox怎么用?C# WorldRenderer.DrawSelectionBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenRA.Graphics.WorldRenderer
的用法示例。
在下文中一共展示了WorldRenderer.DrawSelectionBox方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr)
{
var bounds = self.Bounds.Value;
var xy = new float2(bounds.Left, bounds.Top);
var Xy = new float2(bounds.Right, bounds.Top);
wr.DrawSelectionBox(self, Color.White);
DrawHealthBar(self, xy, Xy);
DrawExtraBars(self, xy, Xy);
DrawUnitPath(self);
}
示例2: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr)
{
if (!Info.Selectable)
return;
var pos = wr.ScreenPxPosition(self.CenterPosition);
var bounds = self.Bounds.Value;
bounds.Offset(pos.X, pos.Y);
var xy = new float2(bounds.Left, bounds.Top);
var Xy = new float2(bounds.Right, bounds.Top);
wr.DrawSelectionBox(self, Color.White);
DrawHealthBar(wr, xy, Xy);
DrawExtraBars(wr, xy, Xy);
DrawUnitPath(wr);
}
示例3: RenderAfterWorld
public void RenderAfterWorld( WorldRenderer wr, World world )
{
wr.DrawSelectionBox(self, Color.White);
}
示例4: DrawInner
public override void DrawInner( WorldRenderer wr )
{
var selbox = SelectionBox;
if (selbox == null) return;
var a = selbox.Value.First;
var b = new float2(selbox.Value.Second.X - a.X, 0);
var c = new float2(0, selbox.Value.Second.Y - a.Y);
Game.Renderer.LineRenderer.DrawLine(a, a + b, Color.White, Color.White);
Game.Renderer.LineRenderer.DrawLine(a + b, a + b + c, Color.White, Color.White);
Game.Renderer.LineRenderer.DrawLine(a + b + c, a + c, Color.White, Color.White);
Game.Renderer.LineRenderer.DrawLine(a, a + c, Color.White, Color.White);
foreach (var u in SelectActorsInBox(world, selbox.Value.First, selbox.Value.Second))
wr.DrawSelectionBox(u, Color.Yellow);
}
示例5: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr, World world)
{
var xy = wr.Viewport.ViewToWorld(Viewport.LastMousePos);
foreach (var unit in power.UnitsInRange(xy))
wr.DrawSelectionBox(unit, Color.Red);
}
示例6: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr, World world)
{
var xy = Game.viewport.ViewToWorld(Viewport.LastMousePos);
var targetUnits = power.UnitsInRange(xy);
foreach (var unit in targetUnits)
if (manager.self.Owner.Shroud.IsTargetable(unit) || manager.self.Owner.HasFogVisibility())
wr.DrawSelectionBox(unit, Color.Red);
}
示例7: RenderAfterWorld
public void RenderAfterWorld(WorldRenderer wr, World world)
{
var units = FindUnitsInCircle(world, _sourceLocation, _range);
foreach (var unit in units)
{
wr.DrawSelectionBox(unit, Color.Yellow);
}
}