本文整理匯總了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);
}
}