示例#1
0
        private void Inspect(CraftingRecipe recipe, CraftItemButton button)
        {
            _currentlyInspecting?.Default();
            _currentlyInspecting = button;

            if (_currentlyInspecting != null)
            {
                _recipeDescriptionView.Display(recipe);
            }
        }
示例#2
0
 private void Recipes_OnInitialised()
 {
     // generate the buttons
     foreach (var recipe in _recipes.AllRecipes)
     {
         CraftItemButton button = Instantiate(_craftItemPrefab, _craftingButtonsAnchor);
         button.OnCraft   = TryCraft;
         button.OnInspect = Inspect;
         button.AttachRecipe(recipe);
     }
 }