Beispiel #1
0
    void Awake()
    {
        // Load the decision tree
        decisionTreeController = FindObjectOfType <DecisionTreeController>();
        if (decisionTreeController != null)
        {
            var path = decisionTreeController.pathDecisionXMLFile;
            decisionTree = DecisionTree.Load(path);
        }
        else
        {
            Debug.LogWarning("Scenario controller could not get the Decision Tree Controller");
        }

        // Get the traffic DB
        TrafficIntegrationController tic = FindObjectOfType <TrafficIntegrationController>();

        if (tic != null)
        {
            if (tic.typeOfIntegration == TrafficIntegrationController.TypeOfIntegration.DecisionTreeIntegration)
            {
                trafficDB = FindObjectOfType <TrafficIntegrationData>();

                if (trafficDB == null)
                {
                    Debug.LogWarning("Scenario controller could not get the Traffic Integration Data");
                }
            }
            else
            {
                Debug.LogWarning("Traffic Integration Controller not set for using decision tree integration");
            }
        }

        // Get the DecisionUIController
        decisionUI = FindObjectOfType <DecisionUIController>();

        // Get the TimeController
        timeController = FindObjectOfType <TimeController>();
    }
Beispiel #2
0
 void Awake()
 {
     decisionUI = FindObjectOfType <DecisionUIController>();
 }
Beispiel #3
0
 // Constructor
 SimQuestion()
 {
     decisionUI = GameObject.FindObjectOfType <DecisionUIController>();
 }