Ejemplo n.º 1
0
        /* Queue a command to be executed on update on the main thread */
        public static void Queue(CommandAttribute command, string[] args)
        {
            QueuedCommand queuedCommand = new QueuedCommand();

            queuedCommand.Command = command;
            queuedCommand.Args    = args;
            Instance.m_commandQueue.Enqueue(queuedCommand);
        }
Ejemplo n.º 2
0
 public static void Update()
 {
     while (Instance.m_commandQueue.Count > 0)
     {
         QueuedCommand cmd = Instance.m_commandQueue.Dequeue();
         cmd.Command.Cbk(cmd.Args);
     }
 }