Exemplo n.º 1
0
    public void EarlyTickChicken(bool interactDown)
    {
        //Talking
        if (_playerController.InDialogue == true)
        {
            return;
        }

        //Set Nearest
        SetNearestNPChicken(GetNearestInteractions(true));

        //Not talking
        //No NPCs
        if (_nearestInteraction == null || _nearestInteraction.Equals(null))
        {
            return;
        }
        //In an action
        if (_playerController.IsDoingAction == true)
        {
            return;
        }

        //Not in ground
        if (_playerController.TouchingGround == false)
        {
            return;
        }

        if (interactDown == true)
        {
            Variables.InteractionTypes type = _nearestInteraction.GetInteractionType();

            if (type == Variables.InteractionTypes.Action)
            {
                _nearestInteraction.TriggerAction(_playerController);
            }
            else if (type == Variables.InteractionTypes.Dialogue && !_playerController.InCredits)
            {
                _nearestInteraction.PreDialogue(_playerController);
                string   npcName  = _nearestInteraction.GetNPCName();
                string[] dialogue = _nearestInteraction.GetCurrentDialogue();
                //Variables.QuestVoices[] voices = _nearestInteraction.GetCurrentAudio();
                startTalking = true;
                //Start Interaction
                _playerController.StartDialogue(npcName, dialogue);
            }
        }
    }
Exemplo n.º 2
0
    public void EarlyTickBeast(bool interactDown)
    {
        //Talking
        if (_playerController.InDialogue == true)
        {
            return;
        }

        //Set Nearest
        SetNearestNPChicken(GetNearestInteractions(false));
        //Not talking
        //No NPCs
        if (_nearestInteraction == null || _nearestInteraction.Equals(null))
        {
            return;
        }
        //In an action
        if (_playerController.IsDoingAction == true)
        {
            return;
        }

        //Not in ground
        if (_playerController.TouchingGround == false)
        {
            return;
        }

        if (interactDown == true)
        {
            Variables.InteractionTypes type = _nearestInteraction.GetInteractionType();

            if (type == Variables.InteractionTypes.Action)
            {
                _nearestInteraction.TriggerAction(_playerController);
            }
        }
    }