From 115f77bda0246a00f6e17469685c67746bdbd29d Mon Sep 17 00:00:00 2001 From: nirav Date: Sat, 12 Dec 2020 07:18:36 +0000 Subject: Initial commit --- Assets/Scripts/Boss1/Boss1HealthScript.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 Assets/Scripts/Boss1/Boss1HealthScript.cs (limited to 'Assets/Scripts/Boss1/Boss1HealthScript.cs') diff --git a/Assets/Scripts/Boss1/Boss1HealthScript.cs b/Assets/Scripts/Boss1/Boss1HealthScript.cs new file mode 100755 index 0000000..541345d --- /dev/null +++ b/Assets/Scripts/Boss1/Boss1HealthScript.cs @@ -0,0 +1,30 @@ +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(); + } + + } +} -- cgit v1.2.3