4using System.Collections;
5using System.Collections.Generic;
24 private EventSystem eventSystem;
36 if(
instance.mouseUsedDelegate ==
null)
104 Debug.Log(
"NULL! e r est");
115 Cursor.lockState = CursorLockMode.None;
123 eventSystem = EventSystem.current;
136 private void Update ()
141 if( Input.anyKeyDown && !
IsKeyInUse() && !ProcessKeyInput() )
155 private void OnLevelReset()
158 if( Undo.nullableInstance !=
null )
159 Destroy(Undo.nullableInstance);
167 bool inuse =
instance.mouseUsedDelegate !=
null &&
instance.mouseUsedDelegate.GetInvocationList().Any(x => ((
MouseInUse)x)(Input.mousePosition));
183 private bool ProcessKeyInput()
186 if(eventSystem !=
null && eventSystem.currentSelectedGameObject !=
null)
188 if( Input.GetKey(KeyCode.Tab) )
190 Selectable next = pb_GUIUtility.GetNextSelectable(eventSystem.currentSelectedGameObject.GetComponent<Selectable>());
194 InputField inputfield = next.GetComponent<InputField>();
196 if (inputfield !=
null)
197 inputfield.OnPointerClick(
new PointerEventData(eventSystem));
206 if( Input.GetKey(KeyCode.LeftCommand) || Input.GetKey(KeyCode.LeftControl) )
209 if( Input.GetKey(KeyCode.Z) )
215 if( Input.GetKey(KeyCode.Y) )
static void AddOnLevelLoadedListener(Callback listener)
static void AddOnLevelClearedListener(Callback listener)
delegate bool MouseInUse(Vector2 mousePosition)