Ejemplo n.º 1
0
 public Sprite GetPotionSprite(OrderItems.Potion potionItem)
 {
     foreach (PotionAssociation currentAssociation in _potionsAssociations)
     {
         if (currentAssociation.color == potionItem.Color)
         {
             return(currentAssociation.sprite);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
    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);
    }