Ejemplo n.º 1
0
    public void ActivateTrigger(Trigger trig)
    {
        switch (trig.triggerType)
        {
        case "QuestStart":
            questManager.StartMiniQuest(trig.actionId);
            questConditionsMetEntryNodeId = trig.secondaryActionId;
            break;

        case "QuestComplete":
            questManager.CompleteMiniQuest(trig.actionId);
            break;

        case "ChangeEntryNode":
            startNodeId = trig.actionId;
            break;

        case "TakeItem":
            questManager.RemoveQuestItems(trig.actionId);
            break;

        case "TakeMoney":
            questManager.TakeMoney(trig.actionId);
            break;

        case "GiveItem":
            questManager.AddQuestItem(trig.actionId);
            break;

        case "ReplaceItem":
            break;

        case "ConditionMet":
            break;

        case "SetNodeDestinationId":
            nodes[FindNodeIndexWithId(trig.actionId)].options[trig.thirdActionId].destinationId = trig.secondaryActionId;
            break;

        default:
            break;
        }
    }