Esempio n. 1
0
 public override void InitializeAgent()
 {
     base.InitializeAgent();
     academy        = FindObjectOfType <SubwayAcademy>();
     rayPer         = GetComponent <RayPerception>();
     agentRB        = GetComponent <Rigidbody>();
     groundRenderer = ground.GetComponent <Renderer>();
     groundMaterial = groundRenderer.material;
 }
    void Start()
    {
        academy   = FindObjectOfType <SubwayAcademy>();
        numAgents = (int)academy.resetParameters["MultiAgents"];

        if (isNotTraining)
        {
            CreateAgent(notTrainingNumAgents, redAgent);
            CreateAgent(notTrainingNumAgents, blueAgent);
        }
    }