Example #1
0
 public void ExecuteAction()
 {
     ChatBubble.Create(gameObject.transform, new Vector3(1f, 1.7f), ChatBubble.IconType.Happy, text);
     FunctionTimer.Create(() => {
         onChatBubbleComplete.ExecuteAction();
     }, 2f);
 }
Example #2
0
        public void AddChatBubble(Entity owner, string text)
        {
            // Clean up with profanity handler
            text = _profanityHandler.ProcessMessage(text);

            ChatBubble.Create(_cScreen, owner, text);
        }
Example #3
0
    void Start()
    {
        ChatBubble.Create(transform, new Vector3(0.5f, 0.5f), sentence, 7f);
        CharacterSound audio = transform.parent.GetComponentInChildren <CharacterSound>();

        audio.PlayBlabla();
    }
Example #4
0
 private void Chatter()
 {
     if (PlayerController.instance.canMove)
     {
         ChatBubble.Create(VegVendorTransform, new Vector2(0, 1f), "Fresh Veggies for sale!");
     }
 }
Example #5
0
 public void GetAware()
 {
     if (awereness == AIType.unaware)
     {
         awereness = AIType.aware;
         GetRoom();
         ChatBubble.Create(transform.GetChild(0), new Vector3(0.5f, 0.5f), "I can't believe it !", 4f);
     }
 }
Example #6
0
 void ShareThought()
 {
     if (awereness == AIType.aware)
     {
         string sentence = "I'm gonna tell " + targetTransform.GetComponent <NpcController>().npcName + " !";
         ChatBubble.Create(transform.GetChild(0), new Vector3(0.5f, 0.5f), sentence, 4f);
     }
     else
     {
         string sentence = "I'm going to the " + targetTransform.name + " !";
         ChatBubble.Create(transform.GetChild(0), new Vector3(0.5f, 0.5f), sentence, 4f);
     }
 }
Example #7
0
    private void Start()
    {
        ChatBubble.Create(playerTransform, new Vector3(3, 8), ChatBubble.IconType.Neutral, "Here is some text!");

        FunctionPeriodic.Create(() => {
            Transform npcTransform = npcTransformArray[npcIndex];
            npcIndex       = (npcIndex + 1) % npcTransformArray.Length;
            string message = GetRandomMessage();

            ChatBubble.IconType[] iconArray =
                new ChatBubble.IconType[] { ChatBubble.IconType.Happy, ChatBubble.IconType.Neutral, ChatBubble.IconType.Angry };
            ChatBubble.IconType icon = iconArray[Random.Range(0, iconArray.Length)];

            ChatBubble.Create(npcTransform, new Vector3(3, 8), icon, message);
        }, 1.5f);
    }
    private void HandleSleezer()
    {
        sleezerTripUpTimer -= Time.deltaTime;
        if (sleezerTripUpTimer < 0f)
        {
            SetTargetMovePosition(playerOvermap.GetPosition());
            float tripUpDistance = 5f;
            if (Vector3.Distance(GetPosition(), playerOvermap.GetPosition()) < tripUpDistance)
            {
                playerOvermap.SleezerTripUp();
                SoundManager.PlaySound(SoundManager.Sound.CharacterHit);
                string chatText;
                switch (UnityEngine.Random.Range(0, 4))
                {
                default:
                case 0: chatText = "Hihihi, sorry about that!"; break;

                case 1: chatText = "Hihihi, don't mind me!";    break;

                case 2: chatText = "Hihihi, I'm so clumsy!";    break;

                case 3: chatText = "Hihihi, silly me!";         break;
                }
                ChatBubble.Create(transform, new Vector3(3.5f, 4), chatText);
                sleezerTripUpTimer = UnityEngine.Random.Range(20f, 50f);

                // Other Message
                Transform randomCharacterTransform = OvermapHandler.GetInstance().GetRandomCharacterTransform(false);
                string    responseMessage;
                switch (UnityEngine.Random.Range(0, 2))
                {
                default:
                case 0: responseMessage = "Oh Sleezer! You're so silly!"; break;

                case 1: responseMessage = "Oh Sleezer! You're adorable!"; break;
                }
                FunctionTimer.Create(() => {
                    ChatBubble.Create(randomCharacterTransform, new Vector3(3.5f, 5), responseMessage);
                }, 5f);

                OvermapFtnDewHandler.DestroyAllChatBubbles_Static();
                OvermapHandler.GetInstance().sleezerActive = true;
                FunctionTimer.Create(() => { OvermapHandler.GetInstance().sleezerActive = false; }, 7f);
            }
        }
    }
Example #9
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return))
     {
         UI_InputWindow.Show_Static(
             "Say what?",
             "",
             "abcdefghijklmnopqrstuvxywz! ABCDEFGHIJKLMNOPQRSTUVXYWZ,.?",
             50,
             () => {
         },
             (string inputText) => {
             ChatBubble.Create(transform, new Vector3(3, 8), ChatBubble.IconType.Happy, inputText);
         }
             );
     }
 }
Example #10
0
 public void AddChatBubble(Entity owner, string text)
 {
     ChatBubble.Create(_cScreen, owner, text);
 }
Example #11
0
 private void Chatter()
 {
     ChatBubble.Create(InnKeeperTransform, new Vector2(0, 1f), "howdy partner");
 }