diff --git a/Assets/scripts/Ore.cs b/Assets/scripts/Ore.cs new file mode 100644 index 00000000..1c0ae6cf --- /dev/null +++ b/Assets/scripts/Ore.cs @@ -0,0 +1,29 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Ore : MonoBehaviour +{ + public int OreHp; + + // Start is called before the first frame update + void Start() + { + + } + public void OreHpDown(int hp) + { + if (OreHp <=0) return; + OreHp-=hp; + } + // Update is called once per frame + void Update() + { + if(OreHp<=0) + { + //ToDo + + Destroy(gameObject); + } + } +}