summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Boss1/Boss1HealthScript.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Boss1/Boss1HealthScript.cs')
-rwxr-xr-xAssets/Scripts/Boss1/Boss1HealthScript.cs30
1 files changed, 30 insertions, 0 deletions
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<BossFighthandlerScript>().EndBossFight();
+ }
+
+ }
+}