Ejemplo n.º 1
0
    //WHAT HAPPENS WHEN SEND FOLLOWER BUTTON IS CLICKED
    void SendFollower()
    {
        if (IDofFollowerdoingQuest == 0 && NodeisActive == true) //CONSIDERED TO BE CHANGEED WITH VALUE IN FOLLOWERSLOT
        {
            Debug.Log("NoFollowerSelected");
            PopUpNoFollowerSelected();
        }

        else if (QuestisActive == false && QuestNumber == GameObject.Find("QuestList").GetComponent <QuestList>().Questnumber)
        {
            //IDofFollowerdoingQuest = GameObject.Find("FollowerSlots").GetComponent<FollowerSlotsManager>().ActiveFollowerSlotID;

            QuestTimeRequired = GameObject.Find("QuestList").GetComponent <QuestList>().Quest_Time; //To get the time required to finish the quest
            QuestTimeStart    = TimerBaar.GetComponent <Timer2>().calen;

            GameObject.Find("FollowerSlots").GetComponent <FollowerSlotsManager>().ChangeFollowerStatebetweenBusyandIdle(IDofFollowerdoingQuest);

            //NIYATI's HAPPINESS
            CommonHappinessIndex.RecaclculateHappinessIndex();

            QuestisActive = true;
            NodeisActive  = false;
            ChangeColourofNode();


            ResetQuestActiveFollower();
            QuestMenu.SetActive(false);
        }
    }
Ejemplo n.º 2
0
 void CheckifQuestTimeisUp()
 {
     if (QuestisActive == true)
     {
         if ((TimerBaar.GetComponent <Timer2>().calen - QuestTimeStart) >= QuestTimeRequired)
         {
             QuestisDone = true;
         }
     }
 }
Ejemplo n.º 3
0
    //POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS...POPUPS

    void PopUpActiveQuestStatus()
    {
        if (QuestisDone == true) //WHEN THE QUEST IS FINISHED
        {
            ReapRewards();
        }


        else
        {
            GameObject.Find("QuestList").GetComponent <QuestList>().FetchQuest(QuestNumber);
            GameObject Follower = GameObject.Find("FollowerSlots").GetComponent <FollowerSlotsManager>().FetchFollowerSlotDetails(IDofFollowerdoingQuest); //MINUS 1 BECAUSE ALL ARRAYS START FROM ZERO

            PopupNotification.SetActive(true);
            GameObject.Find("PopupText").GetComponent <Text>().text = "The Quest is currently being fulfilled by " + Follower.GetComponent <FollowerSlot>().FollowerRace
                                                                      + " " + Follower.GetComponent <FollowerSlot>().FollowerClass + " "
                                                                      + Follower.GetComponent <FollowerSlot>().FollowerName + "\nDays Left = "
                                                                      + (QuestTimeRequired - (TimerBaar.GetComponent <Timer2>().calen - QuestTimeStart));
            ResetQuestIDofFollower();
        }
    }