Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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>();
 }
Exemplo n.º 3
0
 private void Awake()
 {
     visibiCone = this.GetComponent <VisibilityConeCycleIA>();
     Reaction   = GameObject.FindGameObjectWithTag("GameController").GetComponent <ResponseController>();
 }