private void OnTriggerEnter(Collider other) { if (other.tag == "player") { player_health playerStats = other.GetComponent <player_health>(); playerStats.HealthTakeDamage(_damage); } }
// Use this for initialization void Start() { attack1 = GetComponent <enemy_fire>(); attack2 = GetComponent <ram_attack>(); attack3 = GetComponent <spawnTimeBomb>(); attack1.isBoss = true; attCD = AttCD; attack1.enabled = false; attack2.enabled = false; attack3.enabled = false; finishAtt = false; playerHealth = player.GetComponent <player_health>(); }