Пример #1
0
		/// <summary>
		/// Adds a new Action to the list of Actions to be executed every ticks Map-Ticks.
		/// </summary>
		/// <param name="callback"></param>
		public IUpdateObjectAction CallPeriodicallyTicks(int ticks, Action<WorldObject> callback)
		{
			var action = new SimpleObjectUpdateAction(ticks, callback);
			CallPeriodically(action);
			return action;
		}
Пример #2
0
		/// <summary>
		/// Adds a new Action to the list of Actions to be executed every millis.
		/// </summary>
		/// <param name="callback"></param>
		public IUpdateObjectAction CallPeriodically(int millis, Action<WorldObject> callback)
		{
			var ticks = millis / m_Map.UpdateDelay;
			var action = new SimpleObjectUpdateAction(ticks, callback);
			CallPeriodically(action);
			return action;
		}