Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        WorldStateManager.currentAgents.Add(this);
//		Debug.Log ("ID = " + ID);
        knowledgeBase    = new KnowledgeBase(this);
        this.sModule     = new SensorModule(this);
        decisionManager  = new SwarmOpsDecisionManager(knowledgeBase, sensorModule);
        flightController = new NewFlightController(this.gameObject, this.sensorModule);
    }
Beispiel #2
0
 public void CleanUp()
 {
     if (flightController != null)
     {
         flightController.CleanUp();
     }
     if (knowledgeBase != null)
     {
         knowledgeBase.CleanUp();
     }
     if (sModule != null)
     {
         sModule.CleanUp();
     }
     if (decisionManager != null)
     {
         decisionManager.CleanUp();
     }
     flightController = null;
     knowledgeBase    = null;
     sModule          = null;
     decisionManager  = null;
 }