예제 #1
0
        public void ExecuteGeneralTicks(Action action, int ticks, int tickWait = 1000, int wait = 0, object id = null)
        {
            RThread thread = new RThread();

            thread.type          = RThreadType.general_tick;
            thread.id            = id;
            thread.StartWait     = wait;
            thread.PerformAction = action;
            thread.Ticks         = ticks;
            thread.TickSleep     = tickWait;

            if (id != null)
            {
                threads.Add(thread.id, thread);
            }

            thread.Start();
        }
예제 #2
0
        public void ExecuteActions(Action[] actions, int tickWait = 1000, int wait = 0, object id = null)
        {
            RThread thread = new RThread();

            thread.type           = RThreadType.actions;
            thread.id             = id;
            thread.StartWait      = wait;
            thread.PerformActions = actions;
            thread.Ticks          = actions.Length;
            thread.TickSleep      = tickWait;

            if (id != null)
            {
                threads.Add(thread.id, thread);
            }

            thread.Start();
        }
예제 #3
0
        public void ExecuteGeneral(Action action, int wait = 0, object id = null)
        {
            RThread thread = new RThread();

            thread.type          = RThreadType.general;
            thread.id            = id;
            thread.StartWait     = wait;
            thread.PerformAction = action;

            if (id != null)
            {
                threads.Add(thread.id, thread);
            }

            thread.Start();

            Console.WriteLine("threads {0}", threads.Count);
        }