コード例 #1
0
    public void GoToSelection()
    {
        var name        = FilterValidHexCharacters(hexNameField.text);
        var newLocation = new HexagonLocation(name);

        viewController.GoToLocation(newLocation);

        int wall  = int.Parse(wallNumLabel.text);
        int shelf = int.Parse(shelfNumLabel.text);
        int book  = int.Parse(bookNumLabel.text);
        int page  = int.Parse(pageNumLabel.text);

        if (wall != 0 && shelf != 0 && book != 0 && page != 0)
        {
            // Show the selected page

            var pageLocation = new PageLocation()
            {
                Hex   = newLocation,
                Wall  = wall,
                Shelf = shelf,
                Book  = book,
                Page  = page
            };

            viewController.ShowPage(pageLocation, foundTitle, searchInput.text);
            Hide();
        }
        else
        {
            viewController.CloseAllMenus();
        }
    }
コード例 #2
0
 public void GoToLocation(HexagonLocation location)
 {
     librarian.CurrentLocation = location;
 }