public void Initialize(SO_Tag ingredient, SO_Tag[] cookingSteps) { CookingStepsIcon = new List <CookingStepsIcon>(); _CookingStepsToTrack = cookingSteps; _IngredientData = Resources.Load <SO_IngredientData>("IngredientsData"); Ingredient = ingredient; foreach (var cookingStep in _CookingStepsToTrack) { // Adding step icons to the container var cookingStepIcon = Instantiate(_CookingStepsIconPrefab, _StepsContainer); cookingStepIcon.Initialize(cookingStep); CookingStepsIcon.Add(cookingStepIcon); } // Displaying the ingredient icon _IngredientImage.sprite = _IngredientData.GetIngredientIcon(Ingredient); }
private void Awake() { _MatchStartedEvent.AddListener(OnMatchStarted); _IngredientData = Resources.Load <SO_IngredientData>("IngredientsData"); _UpdateUI = null; }