예제 #1
0
    public void UnpackExits()
    {
        foreach (Exit exit in currentRoom.exits)
        {
            exitDictionary.Add(exit.keyString, exit.valueRoom);
            string modifiedDescription = exit.description;

            if (exit.description.Contains(exit.keyString))
            {
                modifiedDescription = string.Format("{0}{1}</color>", TextColors.GetTag(controller.exitsColor), modifiedDescription);
            }

            controller.interactableDescriptions.Add(modifiedDescription);
        }
    }
예제 #2
0
    void PrepareObjects(Room currentRoom)
    {
        foreach (InteractableObject obj in currentRoom.interactableObjectsInRoom)
        {
            string description = interactableItems.GetObjects(obj);
            if (description != null)
            {
                interactableDescriptions.Add(string.Format("{0}{1}</color>", TextColors.GetTag(itemsColor), description));
            }

            foreach (Interaction interaction in obj.interactions)
            {
                if (interaction.inputAction.id == "examine")
                {
                    interactableItems.examineDictionary.Add(obj.noun, interaction.textResponse);
                }

                if (interaction.inputAction.id == "take")
                {
                    interactableItems.takeDictionary.Add(obj.noun, interaction.textResponse);
                }
            }
        }
    }