Example #1
0
    public void useItemsTogether(SpawnedPuzzleItem item1, SpawnedPuzzleItem item2)
    {
        Debug.Log(string.Format("Using {0} with {1}", item1.itemName, item2.itemName));
        IRelationship maybeRel = _currentGame.getRelationship(item1.itemName, item2.itemName);

        if (maybeRel != null)
        {
            // Create an executor for using these two items
            RelationshipExecutor executor = new RelationshipExecutor(item1, item2, _currentRoom, _currentGame);
            maybeRel.addRelationshipToGame(executor);
        }
        else
        {
            _player.activateText("\"I don't think I can use those together.\"", 2);
        }

        _inventory.selectedSlot = null;
    }
Example #2
0
    public void useItemsTogether(SpawnedPuzzleItem item1, SpawnedPuzzleItem item2)
    {
        Debug.Log(string.Format("Using {0} with {1}", item1.itemName, item2.itemName));
        IRelationship maybeRel = _currentGame.getRelationship(item1.itemName, item2.itemName);
        if (maybeRel != null) {
            // Create an executor for using these two items
            RelationshipExecutor executor = new RelationshipExecutor(item1, item2, _currentRoom, _currentGame);
            maybeRel.addRelationshipToGame(executor);
        }
        else {
            _player.activateText("\"I don't think I can use those together.\"", 2);
        }

        _inventory.selectedSlot = null;
    }