public void ChildDied() //This is so sad - Zach 2/2/2021
 {
     Current_EnemyCount -= 1;
     //Debug.Log(Current_EnemyCount);
     if (Current_EnemyCount == 0)
     {
         QH.CheckTaskCompletion(QuestRef, QuestInt);
     }
 }
Beispiel #2
0
    public void ButtonPressed()
    {
        if (pressable)
        {
            TempChildStorage.Pressed(); //This has the logic in the line instead out here like the others

            if (TempChildStorage.return_quest() != null)
            {
                QH.AddQuest(TempChildStorage.return_quest());
            }

            if (TempChildStorage.return_new_start() != null)
            {
                TempChildStorage.GetComponentInParent <DiaRoot>().ModifyStarting(TempChildStorage.return_new_start());
            }

            if (TempChildStorage.QuestTaskReturn)
            {
                QH.CheckTaskCompletion(TempChildStorage.QuestTaskReturn, TempChildStorage.quest_num);
                TempChildStorage.GetComponentInParent <DiaRoot>().Modify_diaCount(false);
            }

            diaParent.Continue(TempChildStorage.return_dest());
        }
    }
    void Update()
    {
        if (LateCounter == 2)
        {
            QH.AddQuest(Quest);
            QH.QuestSetFocus(Quest.gameObject);
            UIControl.DialogueMenuBool(Prom_Initial);
            LateCounter = -1;
        }

        if (LateCounter != -1)
        {
            LateCounter += 1;
        }

        if (!UIControl.GamePaused)
        {
            ControlHallLights();


            if (questTemplate.CompareObj(QuestObjectives[1]))
            {
                if (!initalPallasTrigger.enabled)
                {
                    PallasNearDoor.ModifyLarcenyReq(90); //lock in room
                }
            }


            if (questTemplate.CompareObj(QuestObjectives[2]))
            {
                if (QO2_first)
                {
                    UIControl.DialogueMenuBool(Pallas_post_box);
                    QO2_first = false;
                }

                GameObject w1 = inventory.ReturnWeapon(0);
                GameObject w2 = inventory.ReturnWeapon(1);

                if (w1 != null || w2 != null)
                {
                    QH.CheckTaskCompletion(QuestObjectives[2], 0);
                }
            }


            if (questTemplate.CompareObj(QuestObjectives[3]))
            {
                if (QO3_first)
                {
                    UIControl.DialogueMenuBool(Pallas_fighting);
                    ZomSpawner.SetActive(true);
                    QO3_first = false;
                }
            }


            if (questTemplate.CompareObj(QuestObjectives[4]))
            {
                if (QO4_first)
                {
                    UIControl.DialogueMenuBool(Pallas_final);
                    PallasFarDoor.ModifyLarcenyReq(0);
                    EpimetheusDoor.ModifyLarcenyReq(0);
                    QO4_first = false;
                }
            }

            if (!initalEpimetheusTrigger.enabled)
            {
                DC.ChangeDroneMode(true);
            }
        }
    }
Beispiel #4
0
    public string return_line()
    {
        QuestsHolder QH = GameObject.Find("QuestsHolder").GetComponent <QuestsHolder>();

        Gesture();

        //Camera + Name
        List <Transform> targetTransforms = new List <Transform>();

        targetTransforms.Add(GameObject.Find("Player").transform);
        if (NPC_if_not_self)
        {
            FindObjectOfType <DiaParent>().Set_NPC_name(NPC_if_not_self.GetComponent <HumanoidMaster>().Return_Name());
            targetTransforms.Add(NPC_if_not_self.transform);
        }
        else
        {
            FindObjectOfType <DiaParent>().Set_NPC_name(GetComponentInParent <DiaRoot>().ReturnNPC_name());
            targetTransforms.Add(transform.parent);
        }

        CameraStateController camStateController = FindObjectOfType <CameraStateController>();

        camStateController.SetDiaTargetGroup(targetTransforms);
        //Camera + Name


        if (QuestTaskReturn)
        {
            QH.CheckTaskCompletion(QuestTaskReturn, quest_num);
            GetComponentInParent <DiaRoot>().Modify_diaCount(false);
        }

        if (Quest)
        {
            QH.AddQuest(Quest);
            Quest = null;
        }


        if (cycleLines)
        {
            string templine = Lines[currentLine];
            currentLine = (currentLine + 1) % Lines.Count;
            return(templine);
        }
        else if (cycleLinesNoWrapAround)
        {
            string templine = Lines[currentLine];
            if (currentLine < (Lines.Count - 1))
            {
                currentLine += 1;
            }
            return(templine);
        }
        else if (Lines.Count > 0)
        {
            return(Lines[0]);
        }
        else
        {
            return("");
        }
    }