public List<string> GetButtonsPressed()
{
List<string> btnsPressed = new List<string>();
string[] wmButtonsPressed = new string[11]; //Up, Down, Left, Right, A, B, One, Two, Plus, Minus, Home
string[] keys = new string[10];
foreach (Wiimote wm in wmList)
{
if (wm.WiimoteState.ButtonState.Up)
wmButtonsPressed[0] = "Up";
if (wm.WiimoteState.ButtonState.Down)
wmButtonsPressed[1] = "Down";
if (wm.WiimoteState.ButtonState.Left)
wmButtonsPressed[2] = "Left";
if (wm.WiimoteState.ButtonState.Right)
wmButtonsPressed[3] = "Right";
if (wm.WiimoteState.ButtonState.A)
wmButtonsPressed[4] = "A";
if (wm.WiimoteState.ButtonState.B)
wmButtonsPressed[5] = "B";
if (wm.WiimoteState.ButtonState.One)
wmButtonsPressed[6] = "One";
if (wm.WiimoteState.ButtonState.Two)
wmButtonsPressed[7] = "Two";
if (wm.WiimoteState.ButtonState.Plus)
wmButtonsPressed[8] = "Plus";
if (wm.WiimoteState.ButtonState.Minus)
wmButtonsPressed[9] = "Minus";
if (wm.WiimoteState.ButtonState.Home)
wmButtonsPressed[10] = "Home";
}
for (int i = 0; i < 10; i++)
{
keys[i] = keyBinds[i, 1];
}
for (int i = 0; i < 10; i++)
{
if (wmButtonsPressed.Contains(keys[i]))
btnsPressed.Add(keyBinds[i, 0]);
}
return btnsPressed;
}