コード例 #1
0
 // This is called if a binding is rejected while listening, usually due to the
 // rules set up in the listen options. It's unlikely to get called in this
 // example since we have UnsetDuplicateBindingsOnSet set to true.
 static void OnBindingRejected(PlayerAction action, BindingSource binding, BindingSourceRejectionType rejectionType)
 {
     // This isn't strictly necessary, but maybe we could do a brief flashing red
     // indicator or warning message to tell the user what's going on. We don't
     // actually need to stop listening either, but we do for this example.
     action.StopListeningForBinding();
 }
コード例 #2
0
 public void CallOnBindingRejected(PlayerAction playerAction, BindingSource bindingSource, BindingSourceRejectionType bindingSourceRejectionType)
 {
     if (OnBindingRejected != null)
     {
         OnBindingRejected(playerAction, bindingSource, bindingSourceRejectionType);
     }
 }
コード例 #3
0
 private void OnBindingRejected(PlayerAction action, BindingSource binding, BindingSourceRejectionType reason)
 {
     Debug.Log("Binding rejected... " + binding.DeviceName + ": " + binding.Name + " " + reason);
 }