Update
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
namespace Invector
|
||||
{
|
||||
public class vDestroyOnTrigger : MonoBehaviour
|
||||
{
|
||||
public List<string> targsToDestroy;
|
||||
public float destroyDelayTime;
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (targsToDestroy.Contains(other.gameObject.tag))
|
||||
{
|
||||
Destroy(other.gameObject, destroyDelayTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user