|
- using System;
- using System.Collections.Generic;
- using SUISS.Core;
- using SUISSEngine;
-
- public class CashItem : IPackEffect
- {
- public CashItem(Dictionary<string, object> 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<CIGGameState>.Instance.EarnCurrencies(new Currencies("Cash", this._amount), null);
- }
-
- public static CashItem FromStorage(Dictionary<string, object> dict)
- {
- return new CashItem((decimal)dict["Amount"]);
- }
-
- public Dictionary<string, object> ToStorage()
- {
- return new Dictionary<string, object>
- {
- {
- "Amount",
- this.Amount
- }
- };
- }
-
- public const string AmountKey = "Amount";
-
- private decimal _amount;
- }
|