예제 #1
0
        protected override void OnAmountChange(int oldValue)
        {
            oldValue = CurrencySystem.ConvertTo(CurrencyType, CurrencyType.Gold, oldValue);
            int newValue = CurrencySystem.ConvertTo(CurrencyType, CurrencyType.Gold, this.Amount);

            UpdateTotal(this, TotalType.Gold, newValue - oldValue);
        }
예제 #2
0
        public override int GetTotal(TotalType type)
        {
            int baseTotal = base.GetTotal(type);

            if (type == TotalType.Gold)
            {
                baseTotal += CurrencySystem.ConvertTo(CurrencyType, CurrencyType.Gold, this.Amount);
            }

            return(baseTotal);
        }