Esempio n. 1
0
    public Contact GetNextChoice(Contact contact, int choice)
    {
        Contact nextContact;
        Choice  nextChoice = contact.choices[choice];

        Debug.Log(nextChoice.id);
        contacts.TryGetValue(this.FindNextChoiceContactKey(contact, nextChoice), out nextContact);
        if (nextContact == null)
        {
            return(null);
        }

        UpdateResetChoice(nextContact);
        nextContact = RemoveCurrentChoiceInNextContact(nextContact, nextChoice);
        Debug.Log(nextChoice.id);
        Debug.Log(nextChoice.itemGone == "");
        if (nextChoice.itemGone != "")
        {
            inventoryDataService.RemoveItem(nextChoice.itemGone);
        }
        if (nextContact.finishTask != "")
        {
            gameState.FinishTask(nextContact.finishTask);
        }
        return(nextContact);
    }