當前位置: 首頁>>代碼示例>>C#>>正文


C# Timers.TimerEntry類代碼示例

本文整理匯總了C#中WCell.Core.Timers.TimerEntry的典型用法代碼示例。如果您正苦於以下問題:C# TimerEntry類的具體用法?C# TimerEntry怎麽用?C# TimerEntry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TimerEntry類屬於WCell.Core.Timers命名空間,在下文中一共展示了TimerEntry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SpawnPoint

		public SpawnPoint(SpawnEntry entry, Region region)
		{
			m_spawns = new List<Unit>();
			m_timer = new TimerEntry { Action = Spawn };
			m_timer.Stop();
			Region = region;
			SpawnEntry = entry;
		}
開發者ID:ray2006,項目名稱:WCell,代碼行數:8,代碼來源:SpawnPoint.cs

示例2: InitRegion

		protected internal override void InitRegion()
		{
			base.InitRegion();

			m_lastReset = DateTime.Now;
			m_timeoutTimer = new TimerEntry(OnTimeout);

			RegisterUpdatableLater(this); 
		}
開發者ID:NVN,項目名稱:WCell,代碼行數:9,代碼來源:DungeonInstance.cs

示例3: Battleground

		public Battleground()
		{
			if (HasQueue)
			{
				_queueTimer = new TimerEntry(dt => ProcessPendingPlayers());
				RegisterUpdatable(_queueTimer);
			}

			_status = BattlegroundStatus.None;
			AddPlayersToBiggerTeam = AddPlayersToBiggerTeamDefault;

			_teams = new BattlegroundTeam[2];

			_shutdownTimer = new TimerEntry(dt => Delete());
			RegisterUpdatable(_shutdownTimer);
		}
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:16,代碼來源:Battleground.cs

示例4: InitMap

		protected internal override void InitMap()
		{
			base.InitMap();

			var secs = difficulty.ResetTime;
			if (secs > 0)
			{
				// TODO: Set expiry time correctly
				//m_expiryTime = InstanceMgr.
			}

			m_lastReset = DateTime.Now;

			m_timeoutTimer = new TimerEntry(OnTimeout);

			RegisterUpdatableLater(this);

			// create InstanceSettings object
			settings = CreateSettings();
		}
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:20,代碼來源:BaseInstance.cs

示例5: ArathiBase

		protected ArathiBase(ArathiBasin instance, GOEntry flagstand)
		{
			Instance = instance;

			// init timers
			CaptureTimer = new TimerEntry(dt =>
			{
				Capture();
			});

			StartScoreTimer = new TimerEntry(dt =>
			{
				GivesScore = true;
			});

			Instance.RegisterUpdatableLater(StartScoreTimer);
			Instance.RegisterUpdatableLater(CaptureTimer);

			// TODO: flagstand?
			SpawnNeutral();
		}
開發者ID:NVN,項目名稱:WCell,代碼行數:21,代碼來源:ArathiBase.cs

示例6: ArathiBase

		protected ArathiBase(ArathiBasin instance)
		{
			Instance = instance;

			// init timers
			CaptureTimer = new TimerEntry(dt =>
			{
				Capture();
			});

			StartScoreTimer = new TimerEntry(dt =>
			{
				GivesScore = true;
			});

			Instance.RegisterUpdatableLater(StartScoreTimer);
			Instance.RegisterUpdatableLater(CaptureTimer);

            Names = new string[(int)ClientLocale.End];
            AddSpawns();
			SpawnNeutral();
		}
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:22,代碼來源:ArathiBase.cs

示例7: DeleteNow

		protected internal override void DeleteNow()
		{
			if (m_linkedTrap != null)
			{
				m_linkedTrap.DeleteNow();
			}

			if (Respawns)
			{
				// TODO: Finish respawning
				OnDeleted();
				m_respawnTimer = new TimerEntry();
			}
			else
			{
				base.DeleteNow();
			}
		}
開發者ID:ray2006,項目名稱:WCell,代碼行數:18,代碼來源:GameObject.cs

示例8: 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

示例9: NetworkStatistics

		protected NetworkStatistics()
		{
			m_consumerTimer = new TimerEntry(0f, 0f, ConsumerCallback);
			m_queuedStats = new SynchronizedQueue<PacketInfo>();
		}
開發者ID:ray2006,項目名稱:WCell,代碼行數:5,代碼來源:NetworkStatistics.cs

示例10: Unit

		protected Unit()
		{
			Type |= ObjectTypes.Unit;

			// combat
			m_isInCombat = false;
			m_attackTimer = new TimerEntry(0.0f, 0.0f, CombatTick);

			CastSpeedFactor = 1f;

			ResetMechanicDefaults();

			m_flying = m_waterWalk = m_hovering = m_featherFalling = 0;
			m_canMove = m_canInteract = m_canHarm = m_canCastSpells = true;
		}
開發者ID:ray2006,項目名稱:WCell,代碼行數:15,代碼來源:Unit.cs

示例11: 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

示例12: SpellCast

 /// <summary>
 /// Creates a recyclable SpellCast.
 /// </summary>
 private SpellCast()
 {
     m_castTimer = new TimerEntry(Perform);
     Targets = new HashSet<WorldObject>();
 }
開發者ID:ebakkedahl,項目名稱:WCell,代碼行數:8,代碼來源:SpellCast.cs

示例13: Equals

		public bool Equals(TimerEntry obj)
		{
			// needs to be improved
			return obj.Interval == Interval && Equals(obj.Action, Action);
		}
開發者ID:ray2006,項目名稱:WCell,代碼行數:5,代碼來源:TimerEntry.cs

示例14: SpellCast

		/// <summary>
		/// Creates a recyclable SpellCast.
		/// </summary>
		/// <param name="caster">The GameObject (in case of traps etc) or Unit casting</param>
		private SpellCast()
		{
			m_castTimer = new TimerEntry(Perform);
		}
開發者ID:primax,項目名稱:WCell,代碼行數:8,代碼來源:SpellCast.cs

示例15: SpellChannel

		/// <summary>
		/// Can only work with unit casters
		/// </summary>
		private SpellChannel()
		{
			m_timer = new TimerEntry(Tick);
		}
開發者ID:KroneckerX,項目名稱:WCell,代碼行數:7,代碼來源:SpellChannel.cs


注:本文中的WCell.Core.Timers.TimerEntry類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。