当前位置: 首页>>代码示例>>C#>>正文


C# WorldRenderer.DrawSelectionBox方法代码示例

本文整理汇总了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);
        }
开发者ID:nevelis,项目名称:OpenRA,代码行数:12,代码来源:Selectable.cs

示例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);
        }
开发者ID:Generalcamo,项目名称:OpenRA,代码行数:17,代码来源:Selectable.cs

示例3: RenderAfterWorld

 public void RenderAfterWorld( WorldRenderer wr, World world )
 {
     wr.DrawSelectionBox(self, Color.White);
 }
开发者ID:patthoyts,项目名称:OpenRA,代码行数:4,代码来源:SetChronoTankDestination.cs

示例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);
        }
开发者ID:patthoyts,项目名称:OpenRA,代码行数:17,代码来源:WorldInteractionControllerWidget.cs

示例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);
			}
开发者ID:JackKucan,项目名称:OpenRA,代码行数:6,代码来源:IronCurtainPower.cs

示例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);
 }
开发者ID:TiriliPiitPiit,项目名称:OpenRA,代码行数:8,代码来源:ChronoshiftPower.cs

示例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);
                }
            }
开发者ID:geckosoft,项目名称:OpenRA,代码行数:9,代码来源:ChronoshiftPower.cs


注:本文中的OpenRA.Graphics.WorldRenderer.DrawSelectionBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。