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


C# Circle.Draw方法代码示例

本文整理汇总了C#中Circle.Draw方法的典型用法代码示例。如果您正苦于以下问题:C# Circle.Draw方法的具体用法?C# Circle.Draw怎么用?C# Circle.Draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Circle的用法示例。


在下文中一共展示了Circle.Draw方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

        static void Main(string[] args)
        {
//            var shape = new Shape();


            var circle = new Circle();
            circle.Draw();

            var rectangle = new Rectangle();
            rectangle.Draw();
        }
开发者ID:SteinLabs,项目名称:Mosh_CSharp_Intermediate,代码行数:11,代码来源:Program.cs

示例2: OnEndScene

        public static void OnEndScene(EventArgs args)
        {
            var wRange = new Circle(new ColorBGRA(138, 43, 226, 255), W.Range);

            var eRange = new Circle(new ColorBGRA(138, 43, 226, 255), E.Range);

            var rRange = new Circle(new ColorBGRA(138, 43, 226, 255), R.Range);

            if (GetOption(DMenu, "RD"))
            {
                foreach (var unit in EntityManager.Heroes.Enemies.Where(u => u.IsValidTarget() && u.IsHPBarRendered))
                {
                    var offset = new Vector2(-10, 14);
                    var damage = States.CalcDmg(unit, false);
                    if (!(damage > 0))
                    {
                        continue;
                    }
                    var dmgPercent = ((unit.Health - damage) > 0 ? (unit.Health - damage) : 0) / unit.MaxHealth;
                    var healthPercent = unit.Health / unit.MaxHealth;
                    var start = new Vector2(
                        (int)(unit.HPBarPosition.X + offset.X + dmgPercent * 104),
                        (int)(unit.HPBarPosition.Y + offset.Y) - 5);
                    var end = new Vector2(
                        (int)(unit.HPBarPosition.X + offset.X + healthPercent * 104) + 1,
                        (int)(unit.HPBarPosition.Y + offset.Y) - 5);
                    Drawing.DrawLine(start, end, 9, Color.BlueViolet);
                }
            }
            if (GetOption(DMenu, "W"))
            {
                wRange.Draw(Player.Position);
                //Drawing.DrawCircle(Player.Position, W.Range, Color.BlueViolet);
            }
            if (GetOption(DMenu, "E"))
            {
                eRange.Draw(Player.Position);
                //Drawing.DrawCircle(Player.Position, E.Range, Color.BlueViolet);
            }
            if (GetOption(DMenu, "R"))
            {
                rRange.Draw(Player.Position);
                //Drawing.DrawCircle(Player.Position, R.Range, Color.BlueViolet);
            }
        }
开发者ID:ceechan,项目名称:EloBuddy,代码行数:45,代码来源:Trundle.cs

示例3: OnEndScene

        public static void OnEndScene(EventArgs args)
        {
            var qRange = new Circle(new ColorBGRA(138, 43, 226, 255), Q.Range);
            var wRange = new Circle(new ColorBGRA(138, 43, 226, 255), W.Range);
            var eRange = new Circle(new ColorBGRA(138, 43, 226, 255), E.Range);
            var rRange = new Circle(new ColorBGRA(138, 43, 226, 255), R.Range);

            if (GetOption(DMenu, "Q") && Q.IsReady())
            {
                qRange.Draw(Player.Position);
            }
            if (GetOption(DMenu, "W") && W.IsReady())
            {
                wRange.Draw(Player.Position);
            }
            if (GetOption(DMenu, "E") && E.IsReady())
            {
                eRange.Draw(Player.Position);
            }
            if (GetOption(DMenu, "R") && R.IsReady())
            {
                rRange.Draw(Player.Position);
            }
        }
开发者ID:Enochen,项目名称:EloBuddy,代码行数:24,代码来源:Leona.cs

示例4: Drawing_OnDraw

 // DRAWINGS
 private static void Drawing_OnDraw(EventArgs args)
 {
     var UltRange = SettingsMenu["Rrange"].Cast<Slider>().CurrentValue;
     AARangeCircle = new Circle
     {
         Color = Color.Red,
         Radius = 665
     };
     if (DrawingsMenu["DrawAA"].Cast<CheckBox>().CurrentValue)
     {
         AARangeCircle.Draw(Player.Instance.Position);
     }
     WRangeCircle = new Circle
     {
         Color = Color.Red,
         Radius = 1200
     };
     if (DrawingsMenu["DrawW"].Cast<CheckBox>().CurrentValue)
     {
         WRangeCircle.Draw(Player.Instance.Position);
     }
     UltRangeCircle = new Circle
     {
         Color = Color.Purple,
         Radius = UltRange
     };
     if (DrawingsMenu["DrawR"].Cast<CheckBox>().CurrentValue)
     {
         UltRangeCircle.Draw(Player.Instance.Position);
     }
 }
开发者ID:TheApexx,项目名称:EloBuddy,代码行数:32,代码来源:Program.cs

示例5: OnDraw

 public static void OnDraw(EventArgs args)
 {
     if (!Combo.GetOption(MMenu, "hp"))
     {
         return;
     }
     foreach (var unit in EntityManager.Heroes.Enemies.Where(u => u.IsValidTarget() && u.IsHPBarRendered))
     {
         var offset = new Vector2(0, 10);
         var damage = Combo.CalcDmg(unit, true, false);
         if (damage > 0)
         {
             var dmgPercent = ((unit.Health - damage) > 0 ? (unit.Health - damage) : 0) / unit.MaxHealth;
             var healthPercent = unit.Health / unit.MaxHealth;
             var start = new Vector2(
                 (int)(unit.HPBarPosition.X + offset.X + dmgPercent * 104),
                 (int)(unit.HPBarPosition.Y + offset.Y) - 5);
             var end = new Vector2(
                 (int)(unit.HPBarPosition.X + offset.X + healthPercent * 104) + 1,
                 (int)(unit.HPBarPosition.Y + offset.Y) - 5);
             Drawing.DrawLine(start, end, 9, Color.Gold);
         }
     }
     if (!Combo.GetOption(MMenu, "dr"))
     {
         return;
     }
     var r2Range = new Circle(new ColorBGRA(138, 43, 226, 255), R2.Range);
     r2Range.Draw(Player.Position);
 }
开发者ID:Enochen,项目名称:EloBuddy,代码行数:30,代码来源:Riven.cs

示例6: Drawing_OnDraw

 // DRAWINGS
 public static void Drawing_OnDraw(EventArgs args)
 {
     QRangeCircle = new Circle
     {
         Color = Color.Red,
         Radius = Q.MaximumRange
     };
     if (DrawingsMenu["DrawQ"].Cast<CheckBox>().CurrentValue)
     {
         QRangeCircle.Draw(Player.Instance.Position);
     }
     UltRangeCircle = new Circle
     {
         Color = Color.Red,
         Radius = R.Range
     };
     if (DrawingsMenu["DrawR"].Cast<CheckBox>().CurrentValue)
     {
         UltRangeCircle.Draw(Player.Instance.Position);
     }
 }
开发者ID:TheApexx,项目名称:EloBuddy,代码行数:22,代码来源:Program.cs


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