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


C# WorldRenderer.DrawRangeCircleWithContrast方法代码示例

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

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

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

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

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

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

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

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

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

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


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