public void initKeyState(KeyControl.KeyState keyState)
 {
     keyState.down     = false;
     keyState.press    = false;
     keyState.hold     = false;
     keyState.holdTime = 0f;
     keyState.up       = false;
     keyState.wClick   = false;
 }
 private void setKeyState(int keyName, bool press)
 {
     KeyControl.KeyState keyState = this.keyState.get_Item(keyName);
     if (press)
     {
         this.isAnyKey = true;
         if (!keyState.press)
         {
             keyState.down = true;
             if (LogDrawer.exist())
             {
                 SingletonMonoBehaviour <LogDrawer> .Instance.addDebugText(keyName.ToString());
             }
         }
         else
         {
             keyState.down = false;
         }
         keyState.holdTime += Time.get_deltaTime();
         if (keyState.holdTime > this.holdJudgeTime)
         {
             keyState.hold = true;
         }
         keyState.up    = false;
         keyState.press = true;
         if (this.AutoDownKeys.IndexOf((KeyControl.KeyName)keyName) != -1 && keyState.hold && (this.HoldLockKey == KeyControl.KeyName.KEY_NUM || keyName == (int)this.HoldLockKey))
         {
             this.HoldLockKey = (KeyControl.KeyName)keyName;
             float num;
             if (keyName != 8 && keyName != 10 && keyName != 12 && keyName != 14)
             {
                 num = this.keyInputIntervalButton;
                 this.isDirectKeyHold = true;
             }
             else
             {
                 num = this.keyInputInterval;
             }
             if (this.intervalTime > num)
             {
                 keyState.down     = true;
                 this.intervalTime = 0f;
             }
             else
             {
                 this.intervalTime += Time.get_deltaTime();
             }
         }
     }
     else
     {
         keyState.down     = false;
         keyState.holdTime = 0f;
         keyState.hold     = false;
         if (keyState.press)
         {
             keyState.up = true;
         }
         else
         {
             keyState.up = false;
         }
         keyState.press = false;
         if (this.HoldLockKey == (KeyControl.KeyName)keyName)
         {
             this.HoldLockKey = KeyControl.KeyName.KEY_NUM;
         }
     }
 }