I have public variables which I populate through the inspector. One script is attached to a single object and the other script has a gameObject array property. Please see below:
public class GamePlayScript : MonoBehaviour {
public BallScript ballScript;
public BrickGroupsScript brickGroupsScript;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
BrickGroupsScript contains an array of bricks which has a isBroken bool property. Also the above code is attached to an empty game object. How can I detect when the ball game object is in contact/collided with a brick with isBroken = true?