blob: 541345d175928e7cedd3217fa8f5be58187111e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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();
}
}
}
|