Пример #1
0
		// Token: 0x06000859 RID: 2137 RVA: 0x00024CB8 File Offset: 0x00022EB8
		public DelayExecHelper.IDelayExecItem DelayExec(Action action, int delayTime, uint currTime)
		{
			if (delayTime <= 0)
			{
				action();
				return null;
			}
			uint execTime = (uint)((ulong)currTime + (ulong)((long)delayTime));
			DelayExecHelper.DelayExecItem delayExecItem = new DelayExecHelper.DelayExecItem
			{
				m_action = action,
				m_execTime = execTime
			};
			this.DelayExec(execTime, delayExecItem);
			return delayExecItem;
		}
Пример #2
0
		// Token: 0x0600085B RID: 2139 RVA: 0x00024D68 File Offset: 0x00022F68
		public void Tick(uint currTime)
		{
			for (int i = 0; i < this.m_delayExecList.Count; i++)
			{
				DelayExecHelper.DelayExecItem delayExecItem = this.m_delayExecList[i];
				if (delayExecItem.m_execTime >= currTime)
				{
					break;
				}
				this.m_delayExecList.Remove(delayExecItem);
				i--;
				delayExecItem.m_action();
				if (delayExecItem.m_continueItem != null)
				{
					this.DelayExec(delayExecItem.m_continueItem.m_execTime, delayExecItem.m_continueItem);
				}
			}
		}
Пример #3
0
		// Token: 0x0600085A RID: 2138 RVA: 0x00024CFC File Offset: 0x00022EFC
		private void DelayExec(uint execTime, DelayExecHelper.DelayExecItem item)
		{
			bool flag = false;
			for (int i = 0; i < this.m_delayExecList.Count; i++)
			{
				DelayExecHelper.DelayExecItem delayExecItem = this.m_delayExecList[i];
				if (delayExecItem.m_execTime > execTime)
				{
					flag = true;
					this.m_delayExecList.Insert(i, item);
					break;
				}
			}
			if (!flag)
			{
				this.m_delayExecList.Add(item);
			}
		}