Example #1
0
 void Worker()
 {
     while (true)
     {
         state.Enqueue(ICadeNative.GetState());
         Thread.Sleep(timeStep);
     }
 }
Example #2
0
        void SetActive(bool value)
        {
            if (active != value)
            {
                active = value;

                ICadeNative.SetActive(active);

                if (active)
                {
                    StartWorker();
                    InputManager.AttachDevice(device);
                }
                else
                {
                    StopWorker();
                    InputManager.DetachDevice(device);
                }
            }
        }