Exemplo n.º 1
0
 private void Update()
 {
     if (_isRemapping)
     {
         var e = Enum.GetNames(typeof(KeyCode)).Length;
         for (int i = 0; i < e; i++)
         {
             if (Input.GetKey((KeyCode)i))
             {
                 _settingsSystem.AssignNewKeyCode((KeyCode)i, _currentKeyCodeName);
                 _settingsUI.RefreshButtonText(_currentKeyCodeName, ((KeyCode)i).ToString());
                 _currentKeyCodeName = "";
                 _isRemapping        = false;
             }
         }
     }
 }