Camfight.Form1.GameInputControl C# (CSharp) Method

GameInputControl() private method

private GameInputControl ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void
        private void GameInputControl(KeyEventArgs e)
        {
            int mystate = 0;
            if (gamestate == GameState.GAME)
            {
                if (e.KeyData == Keys.J)
                {
                    playerStateMutex.WaitOne();
                    mystate = 3;
                    myplayer.update(3);
                    playerStateMutex.ReleaseMutex();
                }
                else if (e.KeyData == Keys.L)
                {
                    playerStateMutex.WaitOne();
                    mystate = 6;
                    myplayer.update(6);
                    playerStateMutex.ReleaseMutex();
                }
                packet play = new packet("play", enemyname, null, mystate,0,0,false);
                SendPacket(play);
                myplayerTimer.Start();
            }
        }