GameMainVo.cs 865 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System;
  5. /// <summary>
  6. /// 游戏主界面信息
  7. /// </summary>
  8. public class GameMainVo
  9. {
  10. public GameMainVo()
  11. {
  12. }
  13. /// <summary>
  14. /// 是否推送限时活动礼包信息
  15. /// </summary>
  16. public bool isLimitTsActive
  17. {
  18. get
  19. {
  20. long starTs = long.Parse(GameConfigData.Ins.globalsettings.limitTsActiveGiftStartTs.ToString());
  21. long endTs = long.Parse(GameConfigData.Ins.globalsettings.limitTsActiveGiftEndTs.ToString());
  22. TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
  23. long curTs = Convert.ToInt64(ts.TotalSeconds);
  24. if (starTs <= curTs && curTs < endTs)
  25. {
  26. return true;
  27. }
  28. return false;
  29. }
  30. }
  31. }