private void StartingInitiation() { enemyMovement = enemyMovement ?? gameObject.GetComponent <EnemyMovementBase>(); enemyAttractor = enemyAttractor ?? gameObject.GetComponent <EnemyAttractorEngine>(); EnableInitiation(); enemyAttractor.Attract(gameObject, stats); }
float timer; // Timer for counting up to the next attack. void Awake() { // Setting up the references. homeBase = GameObject.FindGameObjectWithTag("Base"); player = GameObject.FindGameObjectWithTag("Player"); playerHealth = player.GetComponent <PlayerHealth> (); homeBaseHealth = homeBase.GetComponent <PlayerHome> (); enemyHealth = GetComponent <EnemyHealth>(); movement = GetComponent <EnemyMovementBase> (); anim = GetComponent <Animator> (); }
// Use this for initialization private void Start() { movementController = GetComponentInParent <EnemyMovementBase>(); StartCoroutine(FireGun()); }