Aka_s_Vayne.Logic.Tumble.IsGoodPosition C# (CSharp) Method

IsGoodPosition() private static method

private static IsGoodPosition ( System.Vector3 dashPos ) : bool
dashPos System.Vector3
return bool
        private static bool IsGoodPosition(Vector3 dashPos)
        {
            if (Manager.MenuManager.QNWall)
            {
                float segment = Manager.SpellManager.Q.Range / 5;
                for (int i = 1; i <= 5; i++)
                {
                    if (Variables._Player.Position.Extend(dashPos, i * segment).IsWall())
                        return false;
                }
            }

            if (Manager.MenuManager.QNTurret)
            {
                if (Variables.UnderEnemyTower(dashPos.To2D()))
                    return false;
            }

            var enemyCheck = Manager.MenuManager.QNEnemies;
            var enemyCountDashPos = dashPos.CountEnemiesInRange(600);

            if (enemyCheck > enemyCountDashPos)
                return true;

            var enemyCountPlayer = Variables._Player.CountEnemiesInRange(400);

            if (enemyCountDashPos <= enemyCountPlayer)
                return true;

            return false;
        }