public void SpawnIncCircle() { currentIncoming = Instantiate(incCirclePrefab, Vector3.zero, Quaternion.identity).GetComponent <incomingCircle>(); bubble[] bubbles = currentIncoming.getBubbles(); foreach (bubble b in bubbles) { b.SetValue(Random.Range(minValue, maxValue + 1)); } Debug.Log("spawnd"); }
public void collide(incomingCircle other) { foreach (bubble b in myBubbles) { if (b.getIsActive()) { foreach (bubble colliderB in other.getBubbles()) { if (b.getPosition() == colliderB.getPosition()) { b.collide(colliderB.getValue()); } } } } Destroy(other.gameObject); manager.SpawnIncCircle(); }