private void Awake()
 {
     // Forcefully skip spawning follower
     convo     = GetComponent <AIConversant>();
     playerGO  = GameObject.FindGameObjectWithTag("Player");
     questList = playerGO.GetComponent <QuestList>();
 }
Exemplo n.º 2
0
 void Awake()
 {
     Phone      = GameObject.FindWithTag("PhoneMenu");
     conversant = GetComponent <AIConversant>();
     //Loading = GameObject.FindWithTag("GameController").GetComponent<LoadingScreenScript>();
     girlController = GameObject.FindWithTag("GameController").GetComponent <GirlController>();
     girlManager    = GameObject.FindWithTag("GirlContainer").GetComponent <GirlManager>();
 }
Exemplo n.º 3
0
        private void Awake()
        {
            locationManager = GetComponent <LocationManager>();
            GameObject playerGO = GameObject.FindGameObjectWithTag("Player");

            questList  = playerGO?.GetComponent <QuestList>();
            conversant = GetComponent <AIConversant>();
        }
Exemplo n.º 4
0
 public void SelectName()
 {
     BasicFunctions.Name = characterName.text;
     if (BasicFunctions.Name != null)
     {
         AIConversant conversant = GetComponent <AIConversant>();
         GameObject.FindGameObjectWithTag("GameController").GetComponent <PlayerConversant>().StartDialogue(conversant, tutorialDialogue);
         nameMenu.SetActive(false);
     }
 }
Exemplo n.º 5
0
    public void StartDialogue(Dialogue newDialogue, AIConversant conversant)
    {
        currentConversant = conversant;
        currentDialogue   = newDialogue;
        currentNode       = currentDialogue.GetRootNode();

        TriggerEnterAction();

        onConversationUpdated?.Invoke();
    }
Exemplo n.º 6
0
 public void TalkToNPC()
 {
     if (hasMet)
     {
         Debug.Log("Already met");
     }
     else
     {
         AIConversant conversant = GameObject.FindWithTag("LevelManager").GetComponent <AIConversant>();
         conversant.StartDialogue(meetingDialogue);
     }
 }
Exemplo n.º 7
0
    public void QuitDialogue()
    {
        currentDialogue = null;

        TriggerExitAction();

        currentConversant = null;
        currentNode       = null;
        isChoosing        = false;

        onConversationUpdated?.Invoke();
    }
Exemplo n.º 8
0
    // Start is called before the first frame update
    void Start()
    {
        int            date;
        GirlController controller = GetComponent <GirlController>();

        date = controller.GetDateLevel();
        if (date > 2)
        {
            AIConversant Conversant = GetComponent <AIConversant>();
            Conversant.SetNewDialog(dialogue);
        }
    }
    public void StartDialogue()
    {
        inOptions = true;

        GameObject      obj = GameObject.FindGameObjectWithTag("CoopManager");
        DialogueEnabler DE  = obj.GetComponentInChildren <DialogueEnabler>();

        DE.OpenDialogue(transform.parent.gameObject);
        //We get the NPC
        AIConversant conversant = StartParent.GetComponentInChildren <DiscussionTriggerCheck>().GetConversant();

        //Then we launch dialogue
        conversant.OpenDialogue(StartParent.gameObject);
        //We set the player as Kinematic
        player.isKinematic = true;
    }
Exemplo n.º 10
0
    // Leave scene via button
    public void TryLeaving()
    {
        Scheduler schedule = GetComponent <Scheduler>();

        schedule.ResetLocation();

        if (fullness <= capacity)
        {
            AIConversant conversant = GetComponent <AIConversant>();
            conversant.StartDialogue("Out of Food");
        }
        else
        {
            LoadingScreenScript loadingScreenScript = GameObject.FindWithTag("GameController").GetComponent <LoadingScreenScript>();
            loadingScreenScript.LoadNewArea("Home");
        }
    }
Exemplo n.º 11
0
    // Display conversation based on capacity
    private void CapacityReached()
    {
        foodUI.SetActive(false);

        AIConversant conversant = GetComponent <AIConversant>();

        if (capacity >= 100)
        {
            capacity = 100;
            int randomConvo = UnityEngine.Random.Range(0, numMaxFullConvos) + 1;
            conversant.StartDialogue("Max Full " + randomConvo);
        }
        else
        {
            int randomConvo = UnityEngine.Random.Range(0, numFullConvos) + 1;
            conversant.StartDialogue("Full " + randomConvo);
            GetComponent <GirlController>().ModifyBellyCapacity(5);
        }
    }
Exemplo n.º 12
0
        private string ReplaceSubstringVariables(string sInput)
        {
            string sModified;

            if (sInput.IndexOf("[Scene:") >= 0)
            {
                string       sceneName         = sInput.Substring(8, sInput.Length - 9);
                AIConversant currentConversant = playerConversant.GetCurrentConversant();

                SceneText sceneText = Resources.Load(sceneName) as SceneText;
                sModified = sceneText.GetText(currentConversant.gameObject);
            }
            else
            {
                sModified = sInput;
            }
            sModified = sModified.Replace("[Player]", playerConversant.playerName);
            sModified = sModified.Replace("[]", "    ");
            return(sModified);
        }
Exemplo n.º 13
0
 private void Awake()
 {
     conversant = GetComponent <AIConversant>();
 }
Exemplo n.º 14
0
 private void Awake()
 {
     girlConversant = GetComponent <AIConversant>();
     girlSchedule   = GetComponent <Scheduler>();
 }
Exemplo n.º 15
0
 private void Awake()
 {
     conversant     = GetComponent <AIConversant>();
     girlController = GetComponent <GirlController>();
 }
Exemplo n.º 16
0
 private void Awake()
 {
     conversant     = GetComponent <AIConversant>();
     girlController = GetComponent <GirlController>();
     musicSource    = GameObject.FindWithTag("MainCamera").GetComponent <AudioSource>();
 }
Exemplo n.º 17
0
 private void Start()
 {
     conversant = GetComponent <AIConversant>();
 }