当前位置: 首页>>代码示例>>C#>>正文


C# TimerEntry.Start方法代码示例

本文整理汇总了C#中WCell.Core.Timers.TimerEntry.Start方法的典型用法代码示例。如果您正苦于以下问题:C# TimerEntry.Start方法的具体用法?C# TimerEntry.Start怎么用?C# TimerEntry.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WCell.Core.Timers.TimerEntry的用法示例。


在下文中一共展示了TimerEntry.Start方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitializeRegeneration

		/// <summary>
		/// Initializes the regeneration-timers.
		/// Gets called automatically for default NPCs.
		/// </summary>
		public void InitializeRegeneration()
		{
			this.UpdatePowerRegen();
			m_RegenerationDelay = RegenTickDelay;
			m_regenTimer = new TimerEntry(0.0f, m_RegenerationDelay, Regen);
			m_regenTimer.Start();
			m_regenerates = true;
		}
开发者ID:ray2006,项目名称:WCell,代码行数:12,代码来源:Unit.cs

示例2: OnDeath

		protected override void OnDeath()
		{
			m_record.LastDeathTime = DateTime.Now;
			MarkDead();
            Achievements.CheckPossibleAchievementUpdates(AchievementCriteriaType.DeathAtMap, (uint)MapId, 1);
            Achievements.CheckPossibleAchievementUpdates(AchievementCriteriaType.DeathInDungeon, (uint)MapId, 1);
			// start release timer
			m_corpseReleaseTimer = new TimerEntry(dt => ReleaseCorpse());
			m_corpseReleaseTimer.Start(Corpse.AutoReleaseDelay, 0);

		}
开发者ID:remixod,项目名称:netServer,代码行数:11,代码来源:Character.cs

示例3: OnTaxiStart

		internal void OnTaxiStart()
		{
			UnitFlags |= UnitFlags.Influenced;
			IsOnTaxi = true;

			//taxi interpolation timer
			taxiTime = 0;
			m_TaxiMovementTimer = new TimerEntry(0, TaxiMgr.InterpolationDelay, TaxiTimerCallback);
			m_TaxiMovementTimer.Start();
			IsEvading = true;
		}
开发者ID:ray2006,项目名称:WCell,代码行数:11,代码来源:Unit.cs

示例4: OnDeath

		protected override void OnDeath()
		{
			m_record.LastDeathTime = DateTime.Now;
			MarkDead();

			// start release timer
			m_corpseReleaseTimer = new TimerEntry(dt => ReleaseCorpse());
			m_corpseReleaseTimer.Start(Corpse.AutoReleaseDelay, 0);
		}
开发者ID:Skizot,项目名称:WCell,代码行数:9,代码来源:Character.cs

示例5: Start

		protected bool Start()
		{
			try
			{
				IsCached = AuthServerConfiguration.CacheAccounts;

				//I would have liked this to be a readonly field but it must be
				//initialised here otherwise in the ctor AccountReloadIntervalMs
				//wont have been init'd which would mean we cant customise the timer easily
				_accountsReloadTimer = new TimerEntry(0, AccountReloadIntervalMs, delay =>
				{
					if (Instance.IsCached)
						Instance.Resync();
				});
				_accountsReloadTimer.Start();
				AuthenticationServer.IOQueue.RegisterUpdatable(_accountsReloadTimer);

				if (Count == 0)
				{
					log.Info("Detected empty Account-database.");
					//if (!DoesAccountExist("Administrator"))
					//{
					//    CreateAccount("Administrator", DefaultAdminPW, null, RoleGroupInfo.HighestRole.Name, ClientId.Wotlk);
					//    log.Warn("Created new Account \"Administrator\" with same password.");
					//}
				}
			}
			catch (Exception e)
			{
				AuthDBMgr.OnDBError(e);
			}
			return true;
		}
开发者ID:origins,项目名称:WCell,代码行数:33,代码来源:AccountMgr.cs

示例6: StartTimer

		internal void StartTimer()
		{
			m_timer = new TimerEntry(AuthenticationStoreMillis, 0, dl => Remove());
			m_timer.Start();
			AuthenticationServer.IOQueue.RegisterUpdatable(m_timer);
		}
开发者ID:remixod,项目名称:netServer,代码行数:6,代码来源:AuthenticationRecord.cs

示例7: LoadDeathState

		private void LoadDeathState()
		{
			if (m_record.CorpseX != null)
			{
				// we were dead and released the corpse
				var map = World.GetMap(m_record.CorpseMap);
				if (map != null)
				{
					m_corpse = SpawnCorpse(false, false, map,
										   new Vector3(m_record.CorpseX.Value, m_record.CorpseY, m_record.CorpseZ), m_record.CorpseO);
					BecomeGhost();
				}
				else
				{
					// can't spawn corpse -> revive
					if (log.IsWarnEnabled)
					{
						log.Warn("Player {0}'s Corpse was spawned in invalid map: {1}", this, m_record.CorpseMap);
					}
				}
			}
			else if (m_record.Health == 0)
			{
				// we were dead and did not release yet
				var diff = DateTime.Now.Subtract(m_record.LastDeathTime).ToMilliSecondsInt() + Corpse.AutoReleaseDelay;
				m_corpseReleaseTimer = new TimerEntry(dt => ReleaseCorpse());

				if (diff > 0)
				{
					// mark dead and start release timer
					MarkDead();
					m_corpseReleaseTimer.Start(diff, 0);
				}
				else
				{
					// auto release
					ReleaseCorpse();
				}
			}
			else
			{
				// we are alive and kicking
			}
		}
开发者ID:MeaNone,项目名称:WCell,代码行数:44,代码来源:Character.Maintenance.cs

示例8: StartTimer

		internal void StartTimer()
		{
			m_timer = new TimerEntry(AuthenticationStoreSeconds, 0f, dl => Remove());
			m_timer.Start();
			AuthenticationServer.Instance.RegisterUpdatable(m_timer);
		}
开发者ID:ray2006,项目名称:WCell,代码行数:6,代码来源:AuthenticationRecord.cs


注:本文中的WCell.Core.Timers.TimerEntry.Start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。