示例#1
0
        /// <summary>
        /// アイテムを追加する
        /// </summary>
        public void AddItem(MasterDataItem.Record item, int amount)
        {
            var itemId = item.Id;

            if (this.items.ContainsKey(itemId))
            {
                this.items[itemId] += amount;
            }
            else
            {
                this.items.Add(itemId, amount);
            }

            Broker.Global.Publish(AddedItem.Get(this, item, amount));
        }
示例#2
0
 /// <summary>
 /// 生産物のアイコンを表示する
 /// </summary>
 private void Apply(MasterDataItem.Record record)
 {
     this.target.SetActive(true);
     this.productRenderer.material.mainTexture = record.Icon;
 }