コード例 #1
0
    public void nonCloseResponse(int choice)
    {
        GameDataModel.Contact currentContact = this.GetComponentInParent <CharacterContactService>().GetContact();
        nextContact = GetNextChoice(currentContact, choice);

        if (nextContact == null)
        {
            closeMenu();
            return;
        }

        menuDataService.ActivateMenuBtns(nextContact);
        menuDataService.ModifyMenuMessage(nextContact);

        if (nextContact.itemGranted != null)
        {
            string item = nextContact.itemGranted;
            inventoryDataService.ItemFound(nextContact.itemGranted);
            gameMessage.GetComponent <Text>().text = "You are given a " + item + ".";
        }
    }