public CraftDataOperating(GetCraftComponent getCraftComponent)
 {
     _getCraftComponent = getCraftComponent;
     _getCraftComponent.GetCraftButton().onClick.AddListener(AddToInventory);
     _objectList      = new List <GameObject>();
     _craftItemPrefab = Resources.Load("Prefab/CraftItem") as GameObject;
 }
Beispiel #2
0
 public CraftSettings(Canvas canvas)
 {
     _defaultCardList    = new List <Item>();
     _cardList           = new List <Item>();
     _canvas             = canvas;
     _getCraftComponent  = new GetCraftComponent(_canvas);
     _craftDataOperating = new CraftDataOperating(_getCraftComponent);
     _eProfesion         = EProfesion.None;
     _finding            = false;
     SetCraftMenuSize();
     _cardPrefab = Resources.Load("Prefab/ViewCard") as GameObject;
     _getCraftComponent.GetCookingToggle().onValueChanged.AddListener(ChoiseCooking);
     _getCraftComponent.GetSmithingToggle().onValueChanged.AddListener(ChoiseSmithing);
     _getCraftComponent.GetCraftingToggle().onValueChanged.AddListener(ChoiseCrafting);
     _getCraftComponent.GetTailoringToggle().onValueChanged.AddListener(ChoiseTailoring);
     _defaultCardList = ItemDatabase.Database.Where(s => s.EProfesion != EProfesion.None && s.EProfesion != EProfesion.Fishing).ToList();
 }