Merge branch 'main' of http://shu.sheziwanglo.cn:3000/yanghaojing/xi
This commit is contained in:
commit
9c45a3df58
29
Assets/scripts/Ore.cs
Normal file
29
Assets/scripts/Ore.cs
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user