Example #1
0
 void Start()
 {
     gruntAI   = transform.parent.GetComponent <EnemyAI_Grunt>();
     playerHP  = GameObject.Find("PlayerCharacter").GetComponent <PlayerHealth>();
     damage    = gruntAI.damage;
     knockback = gruntAI.knockback;
 }
Example #2
0
 // Unity Functions //
 private void Awake()
 {
     rb            = GetComponent <Rigidbody2D>();
     boxCollider   = GetComponent <BoxCollider2D>();
     enemyScript   = GetComponent <EnemyAI_Grunt>();
     _audioSource  = GetComponent <AudioSource>();
     currentHealth = maxHealth;
 }
Example #3
0
 void Start()
 {
     gruntAI = transform.parent.GetComponent <EnemyAI_Grunt>();
 }