Пример #1
0
        public static void ProcessDoulbeExperience()
        {
            DateTime dateTime = TimeUtil.NowDateTime();

            if (dateTime.Ticks - SpecailTimeManager.JugeDoulbeExperienceTicks >= 50000000L)
            {
                SpecailTimeManager.JugeDoulbeExperienceTicks   = dateTime.Ticks;
                SpecailTimeManager.IsDoulbeExperienceAndLingli = SpecailTimeManager.InDoubleExperienceAndLingLiTimeRange(dateTime);
                SpecailTimeManager.IsDoulbeKaoHuo = SpecailTimeManager.InDoubleKaoHuoTimeRange(dateTime);
            }
        }
Пример #2
0
        /// <summary>
        /// 处理是否是翻倍的时间
        /// </summary>
        public static void ProcessDoulbeExperience()
        {
            DateTime dateTime = DateTime.Now;

            if (dateTime.Ticks - SpecailTimeManager.JugeDoulbeExperienceTicks < (5L * 1000L * 10000L))
            {
                return;
            }

            //限制5秒钟判断一次
            SpecailTimeManager.JugeDoulbeExperienceTicks = dateTime.Ticks;

            //当前是否在双倍经验和双倍灵力时间
            SpecailTimeManager.IsDoulbeExperienceAndLingli = SpecailTimeManager.InDoubleExperienceAndLingLiTimeRange(dateTime);

            //是否是烤火翻倍时间
            SpecailTimeManager.IsDoulbeKaoHuo = SpecailTimeManager.InDoubleKaoHuoTimeRange(dateTime);
        }