Ejemplo n.º 1
0
    public override void Call(float duration, TalkBubbleTypes currentType)
    {
        base.Call(duration, currentType);

        if (currentType == TalkBubbleTypes.ANGRY)
        {
            myAnimator.SetBool("angryCalling", true);
        }
        else
        {
            myAnimator.SetBool("calling", true);
        }

        if (IsFriend && currentType == TalkBubbleTypes.SURPRPISE)
        {
            _ursa.InputActive = false;
        }

        _currentDuration = duration;
        currentState     = NPCStates.CALL;
    }
Ejemplo n.º 2
0
    public virtual void Call(float duration, TalkBubbleTypes currentType)
    {
        GameObject talkBubbleObject = new GameObject();

        if (callBubble)
        {
            Destroy(callBubble);
        }

        switch (currentType)
        {
        case TalkBubbleTypes.ANGRY:
            MakeNoise(true);

            talkBubbleObject = (GameObject)Instantiate(Resources.Load <GameObject>("Prefabs/AngryTalkBubble"), TalkBubblePoint.transform.position, Quaternion.identity);
            talkBubbleObject.transform.localScale = new Vector3(-this.transform.localScale.x, 1, 1);
            break;

        case TalkBubbleTypes.LEFTARROW:
            MakeNoise(false);

            talkBubbleObject = (GameObject)Instantiate(Resources.Load <GameObject>("Prefabs/LeftArrowTalkBubble"), TalkBubblePoint.transform.position, Quaternion.identity);
            //talkBubbleObject.transform.localScale = new Vector3(-this.transform.localScale.x, 1, 1);
            break;

        case TalkBubbleTypes.RIGHTARROW:
            MakeNoise(false);

            talkBubbleObject = (GameObject)Instantiate(Resources.Load <GameObject>("Prefabs/RightArrowTalkBubble"), TalkBubblePoint.transform.position, Quaternion.identity);
            //talkBubbleObject.transform.localScale = new Vector3(-this.transform.localScale.x, 1, 1);
            break;

        case TalkBubbleTypes.HAPPY:
            MakeNoise(false);

            talkBubbleObject = (GameObject)Instantiate(Resources.Load <GameObject>("Prefabs/HappyTalkBubble"), TalkBubblePoint.transform.position, Quaternion.identity);
            talkBubbleObject.transform.localScale = new Vector3(-this.transform.localScale.x, 1, 1);
            break;

        case TalkBubbleTypes.SWIPE:
            MakeNoise(false);

            talkBubbleObject = (GameObject)Instantiate(Resources.Load <GameObject>("Prefabs/SwipeTalkBubble"), TalkBubblePoint.transform.position, Quaternion.identity);
            talkBubbleObject.transform.localScale = new Vector3(-this.transform.localScale.x, 1, 1);
            break;

        case TalkBubbleTypes.SURPRPISE:
            MakeNoise(false);

            talkBubbleObject = (GameObject)Instantiate(Resources.Load <GameObject>("Prefabs/SurpriseTalkBubble"), TalkBubblePoint.transform.position, Quaternion.identity);
            talkBubbleObject.transform.localScale = new Vector3(-this.transform.localScale.x, 1, 1);
            break;

        default:
            Debug.LogWarning("That talk bubble type either doesn't exist or hasn't been set up yet.");
            break;
        }
        TalkBubble talkBubble = talkBubbleObject.GetComponent <TalkBubble>();

        callBubble          = talkBubbleObject;
        talkBubble.Duration = duration;
    }