private void PlaceBubble(Transform location, string dialog) { DialogBubbleCrowd newBubble = GetBubble(); newBubble.gameObject.SetActive(false); if (newBubble.location != null) { closedLocations.Remove(newBubble.location); openLocations.Add(newBubble.location); newBubble.location = null; } //if (stopWhenOutOfDialog && currentDialogIndex == 0) //{ // StopCrowdDialog(); // return; //} newBubble.transform.position = location.position; openLocations.Remove(location); closedLocations.Add(location); newBubble.location = location; newBubble.SetText(dialog); newBubble.gameObject.SetActive(true); }
private DialogBubbleCrowd GetBubble() { DialogBubbleCrowd newBubble = dialogBubbles[currentBubbleIndex]; currentBubbleIndex = (currentBubbleIndex + 1) % (dialogBubbles.Count); return(newBubble); }