Skip to content

Instantly share code, notes, and snippets.

@chabiribon
Created January 30, 2015 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chabiribon/542791ff0e8179f8afea to your computer and use it in GitHub Desktop.
Save chabiribon/542791ff0e8179f8afea to your computer and use it in GitHub Desktop.
void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == "tag1") {
Destroy(col.gameObject);
score += 10;
Debug.Log(score);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment