private void RemoveAllTiersOfColor(ColorIndex colr) { int noOfRingsOfColor = 0; List <Vector3> locationOfNodes = new List <Vector3>(); foreach (ReferencePointBehaviour node in TransformationGrid.NODES) { //Debug.Log("CHECK"); if (node.HaveRing()) { RingPointManager pointManager = node.GetComponent <RingPointManager>(); //Debug.Log("ADD NODE"); if (pointManager.HaveColor(colr)) { noOfRingsOfColor += pointManager.Ring.ReturnNumberOfTiersOfColor(colr); pointManager.Ring.RemoveColor(colr); locationOfNodes.Add(pointManager.gameObject.transform.position); } } } if (noOfRingsOfColor > 0) { Debug.Log("GAMEACTION: Removing tiers of colorindex: " + colr.ToString() + " ( " + noOfRingsOfColor + " ringtiers removed this way!)"); ScoreController.instance.RingsConsumed(noOfRingsOfColor); if (RemoveColorTiersLocationEvent != null) { RemoveColorTiersLocationEvent(locationOfNodes, colr); } if (RemoveColorTiersEvent != null) { RemoveColorTiersEvent(); } } }