Exemplo n.º 1
0
 private void CollectQuestReward(Quest quest)
 {
     foreach (QuestReward reward in quest.Rewards)
     {
         if (!reward.IsCollected)
         {
             QuestActions.CallFunction(reward.OnRewardLuaFunction, reward);
         }
     }
 }
Exemplo n.º 2
0
    private bool IsQuestCompleted(Quest quest)
    {
        quest.IsCompleted = true;
        foreach (QuestGoal goal in quest.Goals)
        {
            QuestActions.CallFunction(goal.IsCompletedLuaFunction, goal);
            quest.IsCompleted &= goal.IsCompleted;
        }

        return(quest.IsCompleted);
    }