Beispiel #1
0
        private IEnumerator <IYieldInstruction> SpawnTextBubble(string chatMessage, Camera camera, IGuiManager guiManager)
        {
            mTextBubble = new TextBubble(guiManager, chatMessage, this.Entity.UnityGameObject.transform, camera);
            // Add some time for long chat messages
            float displayTime = Math.Min(mMaxTextBubbleLiveTime, mMinTextBubbleLiveTime + (chatMessage.Length * mTextBubbleTimePerChar));

            yield return(new YieldForSeconds(displayTime));
        }
Beispiel #2
0
        private IEnumerator <IYieldInstruction> SpawnTextBubble(Texture2D chatImage, Camera camera, IGuiManager guiManager)
        {
            mTextBubble = new TextBubble(guiManager, chatImage, this.Entity.UnityGameObject.transform, camera);
            // Add some time for long chat messages
            float displayTime = mMaxTextBubbleLiveTime;

            yield return(new YieldForSeconds(displayTime));
        }
Beispiel #3
0
 private void CleanupTextBubble()
 {
     if (mTextBubble != null)
     {
         mTextBubble.Dispose();
         mTextBubble = null;
     }
     // Reshow nametag
     AvatarEntity.Nametag.Visible = true;
 }