destory bad things
This commit is contained in:
@@ -5,6 +5,8 @@ public class TrickCollisionManager : MonoBehaviour
|
||||
[SerializeField] private string trickLayerName = "Trick";
|
||||
[SerializeField] private string playerLayerName = "Player";
|
||||
[SerializeField] private string treatLayerName = "Treat";
|
||||
[SerializeField] private string destroyTag = "Destroy";
|
||||
|
||||
private bool initialized;
|
||||
|
||||
private void Awake()
|
||||
@@ -43,4 +45,10 @@ public class TrickCollisionManager : MonoBehaviour
|
||||
|
||||
Physics2D.IgnoreLayerCollision(trickLayer, otherLayer, true);
|
||||
}
|
||||
private void onTriggerEnter2D(Collider2D destroy){
|
||||
if (destroy.CompareTag(destroyTag))
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user