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