Example #1
0
 public override void ObjectRemoved(IGameObject obj)
 {
     if (this.m_Command == null || obj != this.m_Command.GetShip())
     {
         return;
     }
     this.m_Command = (CommandMonitorCombatAIControl)null;
 }
Example #2
0
 public override void Initialize()
 {
     this.m_State          = MonitorAIStates.DISABLE;
     this.m_Command        = (CommandMonitorCombatAIControl)null;
     this.m_HadParent      = false;
     this.m_DisableWeapons = false;
     foreach (IGameObject weaponBank in this.m_Monitor.WeaponBanks)
     {
         weaponBank.PostSetProp("DisableAllTurrets", true);
     }
 }
Example #3
0
 private void ThinkIdle()
 {
     if (this.m_Command == null || this.m_Command.GetShip() == null || this.m_Command.GetShip().IsDestroyed)
     {
         this.m_Command = (CommandMonitorCombatAIControl)null;
     }
     if (!this.m_Monitor.IsDestroyed && (!this.m_HadParent || this.m_Command != null) && !this.m_DisableWeapons)
     {
         return;
     }
     foreach (IGameObject weaponBank in this.m_Monitor.WeaponBanks)
     {
         weaponBank.PostSetProp("DisableAllTurrets", true);
     }
     this.m_State = MonitorAIStates.DISABLE;
 }
Example #4
0
 public override void FindParent(IEnumerable <CombatAIController> controllers)
 {
     foreach (CombatAIController controller in controllers)
     {
         if (controller is CommandMonitorCombatAIControl)
         {
             this.m_Command = controller as CommandMonitorCombatAIControl;
             this.m_Command.AddNormal(this);
             break;
         }
     }
     if (this.m_Command == null)
     {
         return;
     }
     this.m_HadParent = true;
 }