Пример #1
0
 // Use this for initialization
 void Start()
 {
     IaPadre = transform.GetComponentInParent <IA>();
     player  = GameObject.FindGameObjectWithTag("Player");
     sphere  = GetComponent <SphereCollider>();
     agent   = transform.GetComponentInParent <NavMeshAgent>();
     iam     = GameObject.FindGameObjectWithTag("IaManagement").GetComponent <IAManagement>();
 }
Пример #2
0
 void Awake()
 {
     agent           = GetComponent <NavMeshAgent>();
     player          = GameObject.FindGameObjectWithTag("Player");
     sphere          = transform.GetChild(0).GetComponent <SphereCollider>();
     anim            = GetComponent <Animator>();
     rigidbody       = GetComponent <Rigidbody>();
     interrogacion   = transform.GetChild(2).GetComponent <SpriteRenderer>();
     exclamacion     = transform.GetChild(1).GetComponent <SpriteRenderer>();
     currentPatrol   = transform.position;
     rotacionInicial = transform.rotation;
     iamanagement    = GameObject.FindGameObjectWithTag("IaManagement").GetComponent <IAManagement>();
 }
Пример #3
0
 void Start()
 {
     enemigo       = GameObject.FindGameObjectWithTag("Enemy");
     esferaEnemigo = enemigo.GetComponent <SphereCollider>();
     iam           = GameObject.FindGameObjectWithTag("IaManagement").GetComponent <IAManagement>();
 }