public override void Initialize()
        {
            this.m_Target                = (IGameObject)null;
            this.m_ParentBerserker       = (VonNeumannNeoBerserkerControl)null;
            this.m_State                 = VonNeumannDiscStates.SEEK;
            this.m_PodsLaunched          = false;
            this.m_Discs                 = new List <VonNeumannDiscControl>();
            this.m_PossessorBoardingPods = new List <Ship>();
            this.m_UpdateDelay           = 0;
            if (this.m_DiscType != VonNeumannDiscTypes.POSSESSOR)
            {
                return;
            }
            Matrix rotationYpr = Matrix.CreateRotationYPR(this.m_Disc.Maneuvering.Rotation);

            rotationYpr.Position = this.m_Disc.Maneuvering.Position;
            int num = this.m_Disc.BattleRiderMounts.Count <BattleRiderMount>();

            for (int index = 0; index < num; ++index)
            {
                Ship newShip = CombatAIController.CreateNewShip(this.m_Game.Game, rotationYpr, VonNeumann.StaticShipDesigns[VonNeumann.VonNeumannShipDesigns.BoardingPod].DesignId, this.m_Disc.ObjectID, this.m_Disc.InputID, this.m_Disc.Player.ObjectID);
                if (newShip != null)
                {
                    this.m_PossessorBoardingPods.Add(newShip);
                }
            }
            this.m_State = VonNeumannDiscStates.ACTIVATEBOARDINGPODS;
        }
 public override void ObjectRemoved(IGameObject obj)
 {
     if (this.m_Target == obj)
     {
         this.SetTarget((IGameObject)null);
         if (this.m_Disc.CombatStance != CombatStance.NO_STANCE)
         {
             this.m_Disc.SetCombatStance(CombatStance.NO_STANCE);
         }
         this.m_Disc.Maneuvering.PostSetProp("SetStanceTarget", (object)0, (object)0.0f);
     }
     if (this.m_ParentBerserker != null && this.m_ParentBerserker.GetShip() == obj)
     {
         this.m_ParentBerserker = (VonNeumannNeoBerserkerControl)null;
     }
     foreach (VonNeumannDiscControl disc in this.m_Discs)
     {
         if (disc.GetShip() == obj)
         {
             this.m_Discs.Remove(disc);
             break;
         }
     }
     foreach (Ship possessorBoardingPod in this.m_PossessorBoardingPods)
     {
         if (possessorBoardingPod == obj)
         {
             this.m_PossessorBoardingPods.Remove(possessorBoardingPod);
             break;
         }
     }
 }
 public override void ObjectRemoved(IGameObject obj)
 {
     if (this.m_Target == obj)
     {
         this.SetTarget((IGameObject)null);
     }
     if (this.m_ParentBerserker == null || this.m_ParentBerserker.GetShip() != obj)
     {
         return;
     }
     this.m_ParentBerserker = (VonNeumannNeoBerserkerControl)null;
 }
 public override void FindParent(IEnumerable <CombatAIController> controllers)
 {
     foreach (CombatAIController controller in controllers)
     {
         if (controller is VonNeumannNeoBerserkerControl)
         {
             VonNeumannNeoBerserkerControl berserkerControl = controller as VonNeumannNeoBerserkerControl;
             if (berserkerControl.IsThisMyMom(this.m_Pyramid))
             {
                 berserkerControl.AddChild((CombatAIController)this);
                 this.m_ParentBerserker = berserkerControl;
                 break;
             }
         }
     }
 }
 public override void Initialize()
 {
     this.m_Target          = (IGameObject)null;
     this.m_ParentBerserker = (VonNeumannNeoBerserkerControl)null;
 }