void Start() { enemyManaScript = FindObjectOfType <enemyMana>(); playerManaScript = FindObjectOfType <playerMana>(); // Setting up the references. enemyAttackManager = FindObjectOfType <enemyAttackManager>(); enemy = GameObject.FindGameObjectWithTag("Enemy"); playerHealth = FindObjectOfType <playerHealth>(); enemyHealth = enemy.GetComponent <EnemyHealth>(); playerAnim = playerModel.GetComponent <Animator>(); enemyModel = GameObject.FindGameObjectWithTag("EnemyModel"); enemyAnim = enemyModel.GetComponent <Animator>(); }
void Start() { canAttack = false; playerManaScript = FindObjectOfType <playerMana>(); enemyModel = GameObject.FindGameObjectWithTag("EnemyModel"); enemyAnim = enemyModel.GetComponent <Animator>(); playerAnim = playerModel.GetComponent <Animator>(); player = GameObject.FindGameObjectWithTag("Player"); playerHealth = player.GetComponent <playerHealth>(); enemyHealth = FindObjectOfType <EnemyHealth>(); enemyManaScript = FindObjectOfType <enemyMana>(); //AttackManager = FindObjectOfType<AttackManager>(); }