当前位置: 首页>>代码示例>>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;未经允许,请勿转载。