// Description: Displays error with number of isolated nodes found and changes sprite of the respective nodes to highlight them // PRE: disconnectedNodes list is not null // POST: Sprites of disconnected nodes are changed to the error sprite private void DisplayDisconnectedNodes() { string error_text = "You have " + _disconnectedNodes.Count + " disconnected nodes."; _errorView.AppendErrorText(error_text); _errorView.SetDisplayGui(true); for (int j = 0; j < _disconnectedNodes.Count; j++) { _disconnectedNodes[j].GetComponent <SpriteRenderer>().sprite = (Sprite)Resources.Load("BuildViewNodeDISCONNECTED", typeof(Sprite)); } _disconnectedNodes.Clear(); }