Esempio n. 1
0
 void Worker()
 {
     while (true)
     {
         state.Enqueue(ICadeNative.GetState());
         Thread.Sleep(timeStep);
     }
 }
Esempio n. 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);
                }
            }
        }