/// <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)); }
/// <summary> /// 生産物のアイコンを表示する /// </summary> private void Apply(MasterDataItem.Record record) { this.target.SetActive(true); this.productRenderer.material.mainTexture = record.Icon; }