bool CanGetNextCommand() { if (Queue.HasNext == false) { return(false); } _nextCommand = Queue.Peek(); return(_nextCommand.NextExecution <= _frameBeginTime); }
/// <summary> /// Adds the specified command. /// </summary> /// <param name="cmd">The command.</param> /// <returns></returns> public IDeferredCommandHandle Add(DeferredCommand cmd) { float time = CrTime.TotalSeconds; var scheduledCommand = new QueuedCommand(this) { Command = cmd, LastExecution = time, NextExecution = time + cmd.InitExecutionDelay }; Queue.Enqueue(scheduledCommand); return(scheduledCommand); }
void ResetVariables() { _nextCommand = null; _extraTimeNeeded = 0.0f; _processedCommandsCounter = 0; }