您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

51 行
899 B

  1. using System;
  2. using System.Collections.Generic;
  3. using SUISS.Core;
  4. using SUISSEngine;
  5. public class CashItem : IPackEffect
  6. {
  7. public CashItem(Dictionary<string, object> props)
  8. {
  9. this._amount = (decimal)((double)props["Amount"]);
  10. }
  11. public CashItem(decimal amount)
  12. {
  13. this._amount = amount;
  14. }
  15. public decimal Amount
  16. {
  17. get
  18. {
  19. return this._amount;
  20. }
  21. }
  22. public void ApplyEffect()
  23. {
  24. SingletonMonobehaviour<CIGGameState>.Instance.EarnCurrencies(new Currencies("Cash", this._amount), null);
  25. }
  26. public static CashItem FromStorage(Dictionary<string, object> dict)
  27. {
  28. return new CashItem((decimal)dict["Amount"]);
  29. }
  30. public Dictionary<string, object> ToStorage()
  31. {
  32. return new Dictionary<string, object>
  33. {
  34. {
  35. "Amount",
  36. this.Amount
  37. }
  38. };
  39. }
  40. public const string AmountKey = "Amount";
  41. private decimal _amount;
  42. }