public static bool InCatchRadius(Axe a)
        {
            var mode = DravenMenu.Config.Item("catchRadiusMode").GetValue<StringList>().SelectedIndex;
            switch (mode)
            {
                case 1:
                    var b = new Geometry.Polygon.Sector(Draven.Position.To2D(), Game.CursorPos.To2D() - Draven.Position.To2D(), DravenMenu.Config.Item("sectorAngle").GetValue<Slider>().Value
                        * (float)Math.PI / 180, DravenMenu.Config.Item("catchRadius").GetValue<Slider>().Value).IsOutside(a.AxeObj.Position.Extend(Game.CursorPos, 30).To2D());

                    return !b;
                default:
                    return a.AxeObj.Position.Distance(Game.CursorPos) <
                           DravenMenu.Config.Item("catchRadius").GetValue<Slider>().Value;
            }
        }
Esempio n. 2
0
        public static bool InCatchRadius(Axe a)
        {
            var mode = DravenMenu.Config.Item("catchRadiusMode").GetValue <StringList>().SelectedIndex;

            switch (mode)
            {
            case 1:
                var b = new Geometry.Polygon.Sector(Draven.Position.To2D(), Game.CursorPos.To2D() - Draven.Position.To2D(), DravenMenu.Config.Item("sectorAngle").GetValue <Slider>().Value
                                                    *(float)Math.PI / 180, DravenMenu.Config.Item("catchRadius").GetValue <Slider>().Value).IsOutside(a.AxeObj.Position.Extend(Game.CursorPos, 30).To2D());

                return(!b);

            default:
                return(a.AxeObj.Position.Distance(Game.CursorPos) <
                       DravenMenu.Config.Item("catchRadius").GetValue <Slider>().Value);
            }
        }