using System; using System.Collections.Generic; using SUISS.Core; using SUISSEngine; public class CashItem : IPackEffect { public CashItem(Dictionary props) { this._amount = (decimal)((double)props["Amount"]); } public CashItem(decimal amount) { this._amount = amount; } public decimal Amount { get { return this._amount; } } public void ApplyEffect() { SingletonMonobehaviour.Instance.EarnCurrencies(new Currencies("Cash", this._amount), null); } public static CashItem FromStorage(Dictionary dict) { return new CashItem((decimal)dict["Amount"]); } public Dictionary ToStorage() { return new Dictionary { { "Amount", this.Amount } }; } public const string AmountKey = "Amount"; private decimal _amount; }