Exemplo n.º 1
0
 private void BindKey(InputType[] inputs, InputAction inputAction)
 {
     foreach (InputType input in inputs)
     {
         if (input is InputKey)
         {
             inputMapper.MapInput((input as InputKey).scancode, inputAction);
         }
         else if (input is InputJoystick)
         {
             inputMapper.MapInput((input as InputJoystick).button, inputAction);
         }
         else
         {
             throw new ApplicationException("Unable to bind unknown type of InputType");
         }
     }
 }