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