/// <summary>
        /// Starts the first task in the pending tasks queue.
        /// </summary>
        public void StartNextTask()
        {
            if (tasksQueue.Count == 0) //if the tasks queue is empty
            {
                return;
            }

            taskQueueTimer = tasksList[tasksQueue[0]].GetReloadTime(); //start the timer for the next one.
            tasksList[tasksQueue[0]].Start();

            CustomEvents.OnTaskStarted(this, tasksQueue[0], 0); //trigger custon event
        }