private ConversationBubbleOrientation(BubbleOrientation orientation) { BubbleOrientation = orientation; SpriteForOrientation = ConversationBubbleOrientationManager.GetSpriteForOrientation(orientation); TmpEulers = ConversationBubbleOrientationManager.GetTmpEulersForOrientation(orientation); TmpLocalPosition = ConversationBubbleOrientationManager.GetTmpPositionForOrientation(orientation); pivotForOrientation = ConversationBubbleOrientationManager.GetPivotForOrientation(orientation); }
private void OnEnable() { ConversationBubbleOrientationManager.InitializeSprites(leftBubble, centerBubble, rightBubble); bubbleElements = new BubbleDisplay(this.gameObject, isResponse); builder = new StringBuilder(); currentOrientation = ConversationBubbleOrientation.Center; }
private IEnumerator OrientSnippetToFocusedPosition(float time) { var orientations = isResponse ? ConversationBubbleOrientationManager.MoveToRight(currentOrientation.BubbleOrientation) : ConversationBubbleOrientationManager.MoveToLeft(currentOrientation.BubbleOrientation); ConversationBubbleOrientation newOrientation = currentOrientation; float timeInterval = time / (orientations.Length + 1); foreach (var orientation in orientations) { yield return(new WaitForSeconds(timeInterval)); newOrientation = orientation; bubbleElements.SetFromOrientation(newOrientation); } currentOrientation = newOrientation; }