public Sprite GetPotionSprite(OrderItems.Potion potionItem) { foreach (PotionAssociation currentAssociation in _potionsAssociations) { if (currentAssociation.color == potionItem.Color) { return(currentAssociation.sprite); } } return(null); }
private static OrderItems.OrderItem GenerateCustomPotion(int itemComplexity) { OrderItems.Potion potion = new OrderItems.Potion(); PotionColor randomColorWithComplexity; int potionColorIndex; potion.Complexity = itemComplexity; potionColorIndex = Random.Range(0, ItemsOrderable.potionColorsComplexity[itemComplexity].Count); randomColorWithComplexity = ItemsOrderable.potionColorsComplexity[itemComplexity][potionColorIndex]; potion.Color = randomColorWithComplexity; return(potion); }