Example #1
0
 public Quest(objectsInQuest objectInQuest, int startValue, int amountLeft, string title, objectives objective, rewards reward, int rewardAmount)
 {
     this.amountLeft    = amountLeft;
     this.startValue    = startValue;
     this.objectInQuest = objectInQuest;
     this.title         = title;
     this.objective     = objective;
     this.reward        = reward;
     this.rewardAmount  = rewardAmount;
 }
Example #2
0
 public void checkQuests(objectsInQuest objectInQuest, objectives objective, int amount)
 {
     for (int i = 0; i < activeQuests.Count; i++)
     {
         Debug.Log("CHECKING QUEST");
         Debug.Log(activeQuests[i].getObjectInQuest() + "\t" + activeQuests[i].getObjective());
         Debug.Log(objectInQuest + "\t" + objective);
         Debug.Log(activeQuests[i].getObjectInQuest() == objectInQuest && activeQuests[i].getObjective() == objective);
         if (activeQuests[i].getObjectInQuest() == objectInQuest && activeQuests[i].getObjective() == objective)
         {
             if (activeQuests[i].getAmountLeft() - amount <= 0)
             {
                 activeQuests[i].setAmountLeft(0);
                 questUIBox.transform.GetChild(i).gameObject.GetComponent <UIQuest>().updateQuest(activeQuests[i]);
             }
             else
             {
                 activeQuests[i].setAmountLeft(activeQuests[i].getAmountLeft() - amount);
                 questUIBox.transform.GetChild(i).gameObject.GetComponent <UIQuest>().updateQuest(activeQuests[i]);
             }
             break;
         }
     }
 }
Example #3
0
 public void setObjective(objectives objective)
 {
     this.objective = objective;
 }