hi guys,
So i’m making a game similair to flappyBird and whenever you trough the pipes you get a point. The problem is sometimes my player hits the box twice. it gets two piont instead of one. So i want to disable my boxcollder2d for a second after it gets hit by my player. The boxcollider2d are in a loop so they can’t be disabled forever.
Code i used for my collider2d to trigger:
void OnTriggerEnter2D ( Collider2D collider )
{
if( collider.CompareTag("Player") )
{
PlaySound(0);
Scores.AddPoint();
}
}