Example #1
0
        public static void Update(float dt)
        {
            _runCommandTimer += dt;
            if (_runCommandTimer >= RunCommandIntervel)
            {
                _runCommandTimer = 0f; //reset timer

                if (_queuedCommand.Count <= 0)
                {
                    return;
                }

                //check if CMD is avalible
                if (IsReady)
                {
                    CMDQueueItem queueItem = _queuedCommand.Dequeue(); //get the command to run
                    ConsoleWrite("Running Queue Cmd: ");
                    Run(queueItem);                                    //run the command
                }
            }
        }
Example #2
0
 public static void Run(CMDQueueItem item)
 {
     Run(item.CommandLine, item.CommandAction);
 }