private void PlayerHandChanged(PlayerHandManager playersNewHand) { List <Ingredient> ingredientsInHand = new List <Ingredient>(); FoodGameObject foodGameObjectAttached; foreach (var item in playersNewHand.ItemsInHand) { foodGameObjectAttached = item.GetComponent <FoodGameObject>(); if (foodGameObjectAttached != null) { ingredientsInHand.Add(foodGameObjectAttached.FoodIngredient); } } ingredientDisplayer.UpdateSaladIngredientsUI(ingredientsInHand); UpdateUIPosition(); this.gameObject.SetActive(ingredientsInHand.Count > 0); }
//public HandManager commonHandManager; public void EnableManager(MissionCharacterManager characterManager) { this.characterManager = characterManager; EnableAttachedHandDisplayer(); main = this; }