Exemple #1
0
        public Potion(SaveData data) : base(data)
        {
            color = (PotionColor)data.GetIntValue(SaveKeyColor);
            type  = (PotionType)data.GetIntValue(SaveKeyType);
            size  = (PotionSize)data.GetIntValue(SaveKeySize);

            potionData = DataFactory.GetPotionData(type, size);
        }
Exemple #2
0
        public Potion(PotionColor color, PotionType type, PotionSize size, ItemRareness rareness) : base(new ItemConfiguration
        {
            Key      = GetKey(color),
            Name     = "Potion",
            Rareness = rareness,
            Weight   = GetWeight(size)
        })
        {
            this.color = color;
            this.type  = type;
            this.size  = size;

            potionData = DataFactory.GetPotionData(type, size);
        }