void Start() { controller = GameObject.FindGameObjectWithTag("GameController").GetComponent <gameController>(); numberOfIAs = controller.GetComponent <gameController>().numberOfIAs; TrustInOthers = new int[numberOfIAs]; myMemory = GetComponent <Memory>(); base.behaviourManager = controller.GetComponent <BehaviourAdder>(); // interactionFromOtherCharacter = ActionsEnum.Actions.ATTACK; initializeTrustInOthers(numberOfIAs); aiGroup = GetComponent <GroupScript> (); cone = GetComponent <VisibilityConeCycleIA> (); playerNormalStateImage = gameObject.GetComponent <SpriteRenderer> ().sprite; }
void Start() { if (this.tag == "IA") { cycleIA = this.GetComponent <VisibilityConeCycleIA>(); personality = this.GetComponent <AIPersonality> (); objSeenBefore = personality.myMemory.objectsSeenBefore; } else if (this.tag == "Player") { cyclePlayer = this.GetComponent <VisibilityConeCycle>(); playerPersonality = this.GetComponent <PlayerPersonality>(); } agentPositionControllerScript = this.GetComponent <AgentPositionController>(); }
private void Awake() { visibiCone = this.GetComponent <VisibilityConeCycleIA>(); Reaction = GameObject.FindGameObjectWithTag("GameController").GetComponent <ResponseController>(); }