add: pistol weapon and enemy
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using UnityEditor.Embree;
|
||||
using UnityEngine;
|
||||
|
||||
public class Enemy : MonoBehaviour
|
||||
{
|
||||
public float hp = 100f;
|
||||
|
||||
public void DealDamage(float damage) {
|
||||
hp -= damage;
|
||||
if (hp <= 0) Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user