예제 #1
0
 public static bool MatchMetaState(MetaKey meta, InputLayer layer, MetaKey testFlag, KeyCode key1, KeyCode key2, KeyCode key3, KeyCode key4)
 {
     if ((meta & testFlag) != 0 && !layer.GetKey(key1) && !layer.GetKey(key2) && !layer.GetKey(key3) && !layer.GetKey(key4) ||
         (meta & testFlag) == 0 && (layer.GetKey(key1) || layer.GetKey(key2) || layer.GetKey(key3) || layer.GetKey(key4)))
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
 /// <summary>
 /// Has the sequence been pressed this frame?
 /// </summary>
 public bool IsDown(InputLayer layer)
 {
     if (_keyCode != KeyCode.None && layer.GetKey(_keyCode) ||
         !string.IsNullOrEmpty(_keyName) && layer.GetButton(_keyName))
     {
         if (MetaActive(Meta, layer))
         {
             return(true);
         }
     }
     return(false);
 }