示例#1
0
 static void GetKeyUp(ref bool isKey, AdvancedKey advancedKey, KeyCode eventKeyCode, EventType eventType)
 {
     if (eventType == EventType.KeyDown)
     {
         if (eventKeyCode == advancedKey.keyCode && advancedKey.GetSpecialKeys())
         {
             isKey = false;
         }
     }
     if (eventType == EventType.KeyUp)
     {
         if (eventKeyCode == advancedKey.keyCode)
         {
             isKey = true;
         }
     }
 }
示例#2
0
 public static bool IsOnlyShowKeyPressed(Event currentEvent, bool useSameEditorAsBuildShowKey, AdvancedKey showToggleKeyEditor, AdvancedKey showToggleKeyBuild)
 {
     if (useSameEditorAsBuildShowKey || Application.isEditor)
     {
         return(showToggleKeyEditor.OnlyGetKey(currentEvent));
     }
     else
     {
         return(showToggleKeyBuild.OnlyGetKey(currentEvent));
     }
 }