void Awake() { string characterName = ""; characterMovement = GetComponent <CharacterMovement>(); characterMovement.SetRigidBody2D(GetComponent <Rigidbody2D>()); characterMovement.SetCharacterAnimationController(GetComponentInChildren <CharacterAnimationController>()); characterName = gameObject.name; DBConn = new EnemyDatabaseConn(characterName); characterStats = new CharacterStats(DBConn); summonCooldown = new AbilitiesDatabaseConn("Summon").GETAbilityCooldown(); nextSummon = Time.time + 2 * summonCooldown; healthBar.SetMaxHealth(characterStats.GETHealth()); isDead = false; enemyAttackController = GetComponentInChildren <EnemyAttackController>(); enemyAttackController.SetAttackRange(characterStats.GETAttackRange()); enemyAttackController.SetBasicAttackDamage(characterStats.GETAttackDamage()); target = GameObject.Find("PlayerCharacter").GetComponent <Transform>(); seeker = GetComponent <Seeker>(); deathGhost.GetComponent <EnemyController>().aggroRange = aggroRange; InvokeRepeating("UpdatePath", 0f, 0.5f); }