.
This commit is contained in:
parent
92fee25afe
commit
447b7f6737
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user