void OnTriggerEnter2D (Collider2D any) {
if (any.tag == "Circle") {
if (any.gameObject.GetComponent<SpriteRenderer> ().sprite == redState && this.gameObject.GetComponent<SpriteRenderer> ().sprite == redState) {
Debug.Log ("Both Red!");
}
if (any.gameObject.GetComponent<SpriteRenderer>().sprite == redState && this.gameObject.GetComponent<SpriteRenderer> ().sprite == whiteState) {
Debug.Log ("White and Red!");
}
}
}
This function is calling only once, when two red circles collide again, it doesn’t log, or when is red and another is white…
Why is that?