示例#1
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);
     }
 }