Exemplo n.º 1
0
    void PrepareObjectsToInteract(Room currentRoom)
    {
        for (int i = 0; i < currentRoom.interactableObjectsInRoom.Length; i++)
        {
            //Add the item descriptions to the display dictionary if they aren't in already
            string descriptionNotInInventory = interactableItems.GetObjectsNotInInventory(currentRoom, i);
            if (descriptionNotInInventory != null)
            {
                interactionDescriptionsInRoom.Add(descriptionNotInInventory);
            }

            InteractableObject interactableInRoom = currentRoom.interactableObjectsInRoom [i];

            for (int j = 0; j < interactableInRoom.interactions.Length; j++)
            {
                Interaction interaction = interactableInRoom.interactions[j];
                if (interaction.inputAction.keyWords.Contains("examine"))
                {
                    interactableItems.examineDictionary.Add(interactableInRoom.noun, interaction.textResponse);     //Examine Item(Connect to Text response) (Script: Interaction)
                }

                if (interaction.inputAction.keyWords.Contains("take"))
                {
                    interactableItems.takeDictionary.Add(interactableInRoom.noun, interaction.textResponse);     //take Item(Connect to Text response) (Script: Interaction)
                }
            }
        }

        interactableItems.AddActionResponsesToUseDictionary();
    }
Exemplo n.º 2
0
 void UnpackRoom()
 {
     roomNavigation.UnpackExitsInRoom();
     PrepareObjectsToTakeOrExamine(roomNavigation.currentRoom);
     interactableItems.AddActionResponsesToUseDictionary();
 }