public override bool OnKeyDown(Keys key) { if (DisableKeyboard) { return(false); } if (key == Keys.Enter) { if (Connection.LocalPlayer == Connection.Lobby.Owner) { // Start the game if (ClientProtocol.StartGame()) { DisableKeyboard = !DisableKeyboard; var info = clientInformation.GetComponent <Text>(); info.Message = "Starting game"; ChangeState = true; } else { var info = clientInformation.GetComponent <Text>(); info.Message = "Not enough players!"; } } return(true); } return(false); }