Ejemplo n.º 1
0
        public override void Update(GameTime gameTime)
        {
            State.Update();
            if (State.OldState.IsConnected && !State.CurrentState.IsConnected)
            {
                // dc

                if (OnControlDisconnected != null)
                {
                    OnControlDisconnected(this);
                }
                IsConnected = false;
            }
            else if (!State.OldState.IsConnected && State.CurrentState.IsConnected)
            {
                //reconnect
                if (OnControlConnected != null)
                {
                    OnControlConnected(this);
                }
                IsConnected = true;
            }
            InputBuffer.Update();
            timer.Update(InputBuffer, gameTime);
            TriggerEvents(InputBuffer.ReleasedMappings, InputState.Released);
            TriggerEvents(InputBuffer.PressedMappings, InputState.Pressed);
            TriggerEvents(InputBuffer.DownMappings, InputState.Down);
        }
Ejemplo n.º 2
0
 public override void Update(GameTime gameTime)
 {
     State.Update();
     InputBuffer.Update();
     timer.Update(InputBuffer, gameTime);
     TriggerEvents(InputBuffer.ReleasedMappings, InputState.Released);
     TriggerEvents(InputBuffer.PressedMappings, InputState.Pressed);
     TriggerEvents(InputBuffer.DownMappings, InputState.Down);
 }