as the title, someone please help me ?
My Health Script :
My Health Script :
Code (JavaScript):
- #pragma strict
- var Health = 100;
- function ApplyDammage (TheDammage : int)
- {
- Health -= TheDammage;
- if(Health <= 0)
- {
- Dead();
- }
- }
- function Dead()
- {
- Destroy (gameObject);
- }