/// <summary>
        /// create new squadron
        /// </summary>
        /// <param name="Colonel">unit that will be formation leader</param>
        /// <param name="game">game</param>
        public Squadron(UnitPilot Colonel, IGame game)
        {
            isOrdered = false;
            state = States.Nothing;
            neededState = States.Nothing;
            stateChangingTimer = new Timer(0.5f);
            behaviour = Behaviours.Waiting;
            reSortingTimer = new Timer(2);

            List<UnitPilot> pilots = new List<UnitPilot>();
            formation = new SwarmFormation(pilots);
        }
        /// <summary>
        /// sets a new formation type
        /// </summary>
        /// <param name="NewType">new formation type</param>
        public void SetFormationType(FormationTypes NewType)
        {
            isOrdered = NewType!= FormationTypes.Swarm;
            state = States.Nothing;
            neededState = States.Nothing;
            behaviour = Behaviours.Waiting;

            UnitPilot Colonel = formation.Leader;
            List<UnitPilot> pilots =new List<UnitPilot>();
            foreach (UnitPilot pilot in formation)
            {                pilots.Add(pilot);            }
            switch (NewType)
            {
                case FormationTypes.Line: formation = new LineFormation(Colonel, pilots, 100, AngleClass.pi * 0.0f); break;
                case FormationTypes.Bar: formation = new BarFormation(Colonel, pilots, 5, 200, 150, 0); break;
                case FormationTypes.Stagger: formation = new StaggerFormation(Colonel, pilots, 90, 120); break;
                case FormationTypes.Swarm: formation = new SwarmFormation(pilots); break;
                //case FormationTypes.Custom: formation = new CustomFormation(pilots,0); break;
            }
        }