// Use this for initialization
        void Start()
        {
            agent = GetComponent <Agent>();
            if (agent == null)
            {
                Debug.LogError("No LogReader attached to the Replay Analysis Engine.");
            }

            interpreter = GetComponent <Interpreter>();
            if (interpreter == null)
            {
                Debug.LogError("No Calculator attached to the Replay Analysis Engine.");
            }

            //writer = GetComponent<AnalysisWriter>();
            //if (writer == null)
            //    Debug.LogError("No LogWriter attached to the Replay Analysis Engine.");

            extender = GetComponent <ReplayExtender>();
            if (extender == null)
            {
                Debug.LogWarning("No ReplayExtender attached to the Replay Analysis Engine. Adding a DummyExtender.");
                this.gameObject.AddComponent <ReplayExtender>();
            }

            //projectiveAgent = GetComponent<ProjectiveAgent>();
            //if (projectiveAgent != null) {
            //    ReplayMode = IterationMode.ProjectiveReplay;
            //}

            RAEComponent[] raeComps = this.GetComponents <RAEComponent>();

            foreach (RAEComponent comp in raeComps)
            {
                if (comp != agent && comp != interpreter && comp != extender)
                {
                    extraRAEComponents.Add(comp);
                }
            }
        }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     extender = GetComponent <ReplayExtender>();
 }