// Use this for initialization void Start() { target = PlayerManager.instance.player.transform; enemyNav = GetComponent <EnemyNav>(); agent = GetComponent <NavMeshAgent>(); anim = GetComponent <Animator>(); }
/*Get components for use in other methods*/ void Start() { afc = GetComponent <AlwaysFaceCamera>(); an = GetComponent <Animation>(); en = GetComponent <EnemyNav>(); origin = transform.position; origin.y = origin.y + 1; }
private void Awake() { AM = FindObjectOfType <Audiomanager>(); GM = FindObjectOfType <GameManager>(); anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody>(); navAgent = GetComponent <NavMeshAgent>(); capsCol = GetComponent <CapsuleCollider>(); boxCol = GetComponent <BoxCollider>(); enemyNav = GetComponent <EnemyNav>(); }
private void Start() { anim = GetComponent <Animator>(); eNav = transform.parent.GetComponent <EnemyNav>(); if (eNav == null) { Debug.LogError("ACS17AnimationManager:Start() - Can't find EnemyNav component on self or parent."); return; } inited = true; }
void Start() { enemyNavController = Instantiate(navControllerPrefab, player.transform); enemyNav = enemyNavController.GetComponent <EnemyNav>(); enemyUnitData = SetupUnitData(enemyUnitData); // TODO: temp fix for testing REMOVE THIS for (int a = 0; a < enemyUnitData.Length; a++) { for (int i = 0; i < enemyUnitData[a].activeInstances.transform.childCount; i++) { // TODO fix this but not really because we should just remove it anyway enemyUnitData[a].activeInstances.transform.GetChild(i).transform.position = new Vector3(UnityEngine.Random.Range(-10, 10), 0, UnityEngine.Random.Range(-10, 10)); enemyUnitData[a].activeCount += 1; } } }
//------------------------------------ //------------------------------------ // Use this for initialization void Start() { _target = PlayerManager.instance.player.transform; _agent = GetComponent <NavMeshAgent>(); _enemyNav = GetComponent <EnemyNav>(); _enemyHealth = GetComponent <EnemyHealth> (); _animController = GetComponent <GoblinAnimationController>(); _enemyGenerator = GameObject.Find("EnemyGenerator").GetComponent <EnemyGenerator> (); _fieldOfView = GetComponent <FieldOfView> (); if (_target) //視野表示のターゲットを_targetに変更 { _fieldOfView.SetTarget(_target); } _state = State.LOCOMOTION; _soundReaction = GetComponent <EnemySoundReaction> (); _lockOn = false; _lockOnRadius = _fieldOfView.GetLookRadius() / 2; _goblinList = _enemyGenerator.GetGoblinList( ); _findedBomb = null; }
WaitForSeconds enemyDeathTimer; //Timer for enemy's gameobject to be destroyed. void Awake() { //Fill references enemyNav = FindObjectOfType <EnemyNav>(); enemyColor = GetComponent <MeshRenderer>(); }
// Start is called before the first frame update void Start() { enemy = gameObject; enNav = GetComponent <EnemyNav>(); }
// Start is called before the first frame update void Start()//pega script da AI do inimigo { enNav = GetComponentInParent <EnemyNav>(); }
// Use this for initialization void Start() { enemy = GetComponent <EnemyNav>(); // Register this to know when AlertMode is entered (or exited) AlertModeManager.alertModeStatusChangeDelegate += AlertModeStatusChange; }