using UnityEngine; using System.Collections; public class Boss1HealthScript : MonoBehaviour { public int Health = 1000; void Start() { } // Update is called once per frame void Update() { } public void TakeDamage(int damage) { Health -= damage; if (Health <= 0) { GameObject.FindGameObjectWithTag("Boss1FightHandler").GetComponent().EndBossFight(); } } }