Skip to content

Instantly share code, notes, and snippets.

@tdvance
Created August 8, 2016 15:47
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 tdvance/a97ae47ae644a9ce06cb1cef65654aa2 to your computer and use it in GitHub Desktop.
Save tdvance/a97ae47ae644a9ce06cb1cef65654aa2 to your computer and use it in GitHub Desktop.
debug code in a c sharp file
void OnCollisionEnter2D(Collision2D collision)
{
Debug.Log("breakableCount: " + breakableCount);
GameObject[] breakable = GameObject.FindGameObjectsWithTag("Breakable");
Debug.Log("actual breakableCount: " + breakable.Length);
if (isBreakable) {
AudioSource.PlayClipAtPoint(brickBroke, transform.position);
HandleHits();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment