Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private void OnTriggerEnter(Collider other)
{
if (other.name == "TriggerTop")
{
hasTriggeredTop = true;
} else if (other.name == "TriggerBottom") {
if (hasTriggeredTop && !hasBeenScored)
{
GetComponent<Renderer>().material = MaterialBallScored;
Debug.Log(String.Format("{0}, {1}, {2}", SuccessCount++, Distance, Force.y));
}
hasBeenScored = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment