Пример #1
0
    public override void InitializeAgent()
    {
        base.InitializeAgent();
        GameObject area = GameObject.Find("SnakeArea");

        myArea = area.GetComponent <AgentArea>();
    }
Пример #2
0
 /// <summary>
 /// Initialize the agent eg. initialize agents attributes with objects found on the scene.
 /// This method should be called one time before the training starts.
 /// </summary>
 public override void InitializeAgent()
 {
     base.InitializeAgent();
     agentRigidbody = GetComponent <Rigidbody>();
     rayPerception  = GetComponent <RayPerception>();
     goall          = GameObject.Find("Goal");
     agentArea      = transform.parent.GetComponent <AgentArea>();
 }