CameraBuddy.Game.Minions.GetMinions C# (CSharp) Method

GetMinions() public static method

public static GetMinions ( MinionType type, System.Vector3 posFrom, float distance = -1 ) : List
type MinionType
posFrom System.Vector3
distance float
return List
        public static List<GameObject> GetMinions(MinionType type, Vector3 posFrom, float distance = -1)
        {
            var temp = new List<GameObject>();
            switch (type)
            {
                case MinionType.Ally:
                    temp.AddRange(
                        EntityManager.MinionsAndMonsters.AlliedMinions.Where(
                            x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance) //Select all if posFrom is Vector3.Zero otherwise select 
                            .Select(minion => new MinionGameObject(minion)));
                    break;
                case MinionType.Enemy:
                    temp.AddRange(
                        EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                            x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance)
                            .Select(minion => new MinionGameObject(minion)));
                    break;
                case MinionType.All:
                    temp.AddRange(
                        EntityManager.MinionsAndMonsters.AlliedMinions.Where(
                            x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance)
                            .Select(minion => new MinionGameObject(minion)));
                    temp.AddRange(
                        EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                            x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance)
                            .Select(minion => new MinionGameObject(minion)));
                    break;
                case MinionType.Debug:
                    temp.AddRange(DebugPosistions.Select(x => new DebugGameObject(x)));
                    break;
                case MinionType.Killable:
                    temp.AddRange(Orbwalker.LaneClearMinionsList.Select(x => new MinionGameObject(x)));
                    break;
                default:
                    throw new ArgumentOutOfRangeException("MinionType", type, null);
            }
            return temp;
        }
        public enum MinionType
Minions