14 lines
253 B
C#
14 lines
253 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class Health : MonoBehaviour
|
|||
|
{
|
|||
|
public int hp;
|
|||
|
// Update is called once per frame
|
|||
|
void Update()
|
|||
|
{
|
|||
|
if (hp <= 0) Destroy(gameObject);
|
|||
|
}
|
|||
|
}
|