public void checkBtnPress(int i) { switch (i) { case 0: if (btn0KeyDown == true) { btn0KeyDown = false; btn0Pressed = true; GF.AddToArray(0); GF.Check(KeyCode.Q); _pressedButton = KeyCode.Q; SoundManager.PlaySound("Selection"); Debug.Log("sdsad"); } else if (btn0Pressed == false) { btn0KeyDown = true; } break; case 1: if (btn1KeyDown == true) { btn1KeyDown = false; btn1Pressed = true; GF.AddToArray(1); GF.Check(KeyCode.W); _pressedButton = KeyCode.W; SoundManager.PlaySound("Selection"); } else if (btn1Pressed == false) { btn1KeyDown = true; } break; case 2: if (btn2KeyDown == true) { btn2KeyDown = false; btn2Pressed = true; GF.AddToArray(2); GF.Check(KeyCode.E); _pressedButton = KeyCode.E; SoundManager.PlaySound("Selection"); } else if (btn2Pressed == false) { btn2KeyDown = true; } break; case 3: if (btn3KeyDown == true) { btn3KeyDown = false; btn3Pressed = true; GF.AddToArray(3); GF.Check(KeyCode.R); _pressedButton = KeyCode.R; SoundManager.PlaySound("Selection"); } else if (btn3Pressed == false) { btn3KeyDown = true; } break; case 4: if (btn4KeyDown == true) { btn4KeyDown = false; btn4Pressed = true; GF.AddToArray(4); GF.Check(KeyCode.T); _pressedButton = KeyCode.T; SoundManager.PlaySound("Selection"); } else if (btn4Pressed == false) { btn4KeyDown = true; } break; case 5: if (btn5KeyDown == true) { btn5KeyDown = false; btn5Pressed = true; GF.AddToArray(5); GF.Check(KeyCode.Y); _pressedButton = KeyCode.Y; SoundManager.PlaySound("Selection"); } else if (btn5Pressed == false) { btn5KeyDown = true; } break; default: break; } }