// Start is called before the first frame update void Start() { // Big objects - objects that the agent can hide behind standing. bigObjList = new List <GameObject>(); GameObject[] objs = GameObject.FindGameObjectsWithTag("Big Object"); for (int i = 0; i < objs.Length; i++) { bigObjList.Add(objs[i]); coversCombined.Add(objs[i]); } // Small objects - objects that the agent can cover behind crouching. smallObjList = new List <GameObject>(); objs = GameObject.FindGameObjectsWithTag("Small Object"); for (int i = 0; i < objs.Length; i++) { smallObjList.Add(objs[i]); coversCombined.Add(objs[i]); } visitedCovers = new List <GameObject>(); movementScript = gameObject.GetComponent <MovementScript>(); player = GameObject.FindGameObjectWithTag("Player"); decisionMaking = gameObject.GetComponent <DecisionMakingScript>(); agentScript = gameObject.GetComponent <AgentScript>(); }
// Start is called before the first frame update void Start() { decisionMaking = gameObject.GetComponent <DecisionMakingScript>(); movementScript = gameObject.GetComponent <MovementScript>(); agentScript = gameObject.GetComponent <AgentScript>(); }