This commit is contained in:
LeeJaeHyun 2024-09-12 14:26:13 +09:00
parent 92fee25afe
commit 447b7f6737

View File

@ -5,15 +5,21 @@ using UnityEngine;
public class Barrel : MonoBehaviour
{
private GameObject expEffect;
private int hitCount = 0;
void Start()
{
expEffect = Resources.Load<GameObject>("BigExplosion");
}
// Update is called once per frame
void Update()
void OnCollisionEnter(Collision coll)
{
if (coll.collider.CompareTag("BULLET"))
{
if (++hitCount == 3)
{
}
}
}
}