Пример #1
0
 /// <summary>
 /// Initialize the Item with the values of the _itemServer.
 /// </summary>
 /// <param name="_itemServer"></param>
 public virtual void Initialize(ItemServer _itemServer)
 {
     id       = _itemServer.id;
     itemName = _itemServer.itemName;
     icon     = Resources.Load <Sprite>("Sprites/" + _itemServer.image);
     ColorUtility.TryParseHtmlString(_itemServer.color, out color);
 }
Пример #2
0
        /// <summary>
        /// Initialize the Currency with the values of the _itemServer.
        /// </summary>
        /// <param name="_itemServer"></param>
        public override void Initialize(ItemServer _itemServer)
        {
            if (!(_itemServer is CurrencyServer itemCurrencyServer))
            {
                return;
            }

            base.Initialize(_itemServer);

            enabled       = itemCurrencyServer.enabled;
            defaultAmount = itemCurrencyServer.defaultAmount;
            maxAmount     = itemCurrencyServer.maxAmount;
        }
Пример #3
0
        /// <summary>
        /// Initialize the Skin with the values of the _itemServer as SkinServer.
        /// </summary>
        /// <param name="_itemServer"></param>
        public override void Initialize(ItemServer _itemServer)
        {
            if (!(_itemServer is SkinServer itemSkinServer))
            {
                return;
            }

            base.Initialize(_itemServer);

            enabled       = itemSkinServer.enabled;
            unlockAtStart = itemSkinServer.unlockAtStart;
            price         = itemSkinServer.price;
        }