Apidcloud

User Action - LM

Mar 30th, 2016
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private bool _userAction = false;
  2.  
  3. void OnFrame(Frame frame)
  4. {
  5.     // if user has not taken an action (e.g., press a button), return
  6.     if (!_userAction)
  7.         return;
  8.  
  9.     // call functions to determine pinch, grab, etc.
  10.  
  11.     // you probably need a timeout. After 5 seconds, set the _userAction back to 'false'.
  12. }
  13.  
  14. void OnButtonClick(e sender)
  15. {
  16.     // user has clicked in the button
  17.     _userAction = true;
  18. }
RAW Paste Data