コード例 #1
0
ファイル: Talon.cs プロジェクト: sadnecc/CHportcn
        /// <summary>
        ///     Called when the game draws itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private static void OnDraw(EventArgs args)
        {
            try
            {
                if (Player.IsDead)
                {
                    return;
                }

                if (getCheckBoxItem(miscellaneousMenu, "GFUELTalon.Draw.W") && W.IsReady())
                {
                    var target = TargetSelector.GetTarget(W.Range, DamageType.Physical);

                    if (target.IsValidTarget() == false)
                    {
                        return;
                    }

                    var polygon = new Geometry.Polygon.Sector(
                        ObjectManager.Player.Position,
                        target.Position,
                        54 * (float)Math.PI / 180,
                        700);
                    polygon.UpdatePolygon();
                    polygon.Draw(Color.Aqua);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
コード例 #2
0
        /// <summary>
        ///     Called when the game draws itself.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private static void OnDraw(EventArgs args)
        {
            try
            {
                if (Player.IsDead)
                {
                    return;
                }

                if (getCheckBoxItem(miscellaneousMenu, "GFUELTalon.Draw.W") && W.IsReady())
                {
                    var target = TargetSelector.GetTarget(W.Range, DamageType.Physical);

                    if (target.LSIsValidTarget() == false)
                    {
                        return;
                    }

                    var polygon = new Geometry.Polygon.Sector(
                        ObjectManager.Player.Position,
                        target.Position,
                        54*(float) Math.PI/180,
                        700);
                    polygon.UpdatePolygon();
                    polygon.Draw(Color.Aqua);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }