Example #1
0
    /// <summary>
    /// constructor
    /// </summary>
    public ProductGem(Master.BillingData master)
        : base(master)
    {
        this.iconSize  = new Vector2(256, 256);
        this.chargeGem = (uint)this.addItems.Where(x => x.itemType == (uint)ItemType.ChargeGem).Sum(x => x.itemNum);
        this.freeGem   = (uint)this.addItems.Where(x => x.itemType == (uint)ItemType.FreeGem).Sum(x => x.itemNum);

        //商品名は「〇〇ジェム」になる
        this.m_productName = Masters.LocalizeTextDB.GetFormat("UnitGem", this.chargeGem + this.freeGem);

        //商品説明は「{0:#,0}ジェム(有償{1:#,0}ジェム)」になる
        this.m_description = Masters.LocalizeTextDB.GetFormat("BreakdownTotalGem", this.chargeGem + this.freeGem, this.chargeGem);
    }
Example #2
0
    /// <summary>
    /// construct
    /// </summary>
    protected ProductBilling(Master.BillingData master)
        : base(master)
    {
        //値段
        this.price = this.master.needMoney;

        //付与されるアイテム
        this.addItems = Masters.BillingItemDB
                        .GetList()
                        .Where(x => x.billingItemId == this.master.billingItemId)
                        .Select(x => new AddItem {
            itemType = x.itemType, itemId = x.itemId, itemNum = x.itemNum
        })
                        .ToArray();
    }