1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
private Device clavier;
private Key Up = Key.UpArrow;
private Key Down = Key.DownArrow;
private Key _Left = Key.LeftArrow;
private Key _Right = Key.RightArrow;
// Flags
CooperativeLevelFlags flag;
flag = Microsoft.DirectX.DirectInput.CooperativeLevelFlags.NonExclusive;
flag |= Microsoft.DirectX.DirectInput.CooperativeLevelFlags.Background;
clavier = new Device(SystemGuid.Keyboard);
clavier.SetCooperativeLevel(this, flag);
// On obtient l'accès au clavier
clavier.Acquire(); |
Partager