void On_Swipe(Gesture gesture) { if (!isSwipeSelf && gesture.GetCurrentPickedObject() != gameObject) { return; } else { isSwipeSelf = true; } if (gesture.touchCount == 1 && ((gesture.pickedObject != gameObject && !allowSwipeStartOverMe) || allowSwipeStartOverMe)) { fingerIndex = gesture.fingerIndex; if (actionTriggering == ActionTriggering.InProgress) { if (isRightDirection(gesture)) { onSwipeAction.Invoke(gesture); if (enableSimpleAction) { DoAction(gesture); } } } } }
static int GetCurrentPickedObject(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { HedgehogTeam.EasyTouch.Gesture obj = (HedgehogTeam.EasyTouch.Gesture)ToLua.CheckObject <HedgehogTeam.EasyTouch.Gesture>(L, 1); UnityEngine.GameObject o = obj.GetCurrentPickedObject(); ToLua.PushSealed(L, o); return(1); } else if (count == 2) { HedgehogTeam.EasyTouch.Gesture obj = (HedgehogTeam.EasyTouch.Gesture)ToLua.CheckObject <HedgehogTeam.EasyTouch.Gesture>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); UnityEngine.GameObject o = obj.GetCurrentPickedObject(arg0); ToLua.PushSealed(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: HedgehogTeam.EasyTouch.Gesture.GetCurrentPickedObject")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void DoAction(Gesture gesture) { axisActionValue = gesture.deltaPinch * sensibility * Time.deltaTime; if (isGestureOnMe) { if (realType == GameObjectType.UI) { if (gesture.isOverGui) { if ((gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf(transform))) { onPinchAction.Invoke(gesture); if (enableSimpleAction) { DoDirectAction(axisActionValue); } } } } else { if ((!enablePickOverUI && gesture.pickedUIElement == null) || enablePickOverUI) { if (gesture.GetCurrentPickedObject(true) == gameObject) { onPinchAction.Invoke(gesture); if (enableSimpleAction) { DoDirectAction(axisActionValue); } } } } } else { if ((!enablePickOverUI && gesture.pickedUIElement == null) || enablePickOverUI) { onPinchAction.Invoke(gesture); if (enableSimpleAction) { DoDirectAction(axisActionValue); } } } }
// Token: 0x060002AE RID: 686 RVA: 0x0000CB34 File Offset: 0x0000AF34 private void On_TouchDown(Gesture gesture) { if (this.realType != QuickBase.GameObjectType.UI) { if ((!this.enablePickOverUI && gesture.GetCurrentFirstPickedUIElement(false) == null) || this.enablePickOverUI) { if (gesture.GetCurrentPickedObject(false) == base.gameObject) { if (!this.fingerOver[gesture.fingerIndex] && ((!this.isOnTouch && !this.isMultiTouch) || this.isMultiTouch)) { this.fingerOver[gesture.fingerIndex] = true; this.onTouchEnter.Invoke(gesture); this.isOnTouch = true; } else if (this.fingerOver[gesture.fingerIndex]) { this.onTouchOver.Invoke(gesture); } } else if (this.fingerOver[gesture.fingerIndex]) { this.fingerOver[gesture.fingerIndex] = false; this.onTouchExit.Invoke(gesture); if (!this.isMultiTouch) { this.isOnTouch = false; } } } else if (gesture.GetCurrentPickedObject(false) == base.gameObject && !this.enablePickOverUI && gesture.GetCurrentFirstPickedUIElement(false) != null && this.fingerOver[gesture.fingerIndex]) { this.fingerOver[gesture.fingerIndex] = false; this.onTouchExit.Invoke(gesture); if (!this.isMultiTouch) { this.isOnTouch = false; } } } else if (gesture.GetCurrentFirstPickedUIElement(false) == base.gameObject) { if (!this.fingerOver[gesture.fingerIndex] && ((!this.isOnTouch && !this.isMultiTouch) || this.isMultiTouch)) { this.fingerOver[gesture.fingerIndex] = true; this.onTouchEnter.Invoke(gesture); this.isOnTouch = true; } else if (this.fingerOver[gesture.fingerIndex]) { this.onTouchOver.Invoke(gesture); } } else if (this.fingerOver[gesture.fingerIndex]) { this.fingerOver[gesture.fingerIndex] = false; this.onTouchExit.Invoke(gesture); if (!this.isMultiTouch) { this.isOnTouch = false; } } }
private void On_TouchDown(Gesture gesture) { if (realType != GameObjectType.UI) { if ((!enablePickOverUI && gesture.GetCurrentFirstPickedUIElement() == null) || enablePickOverUI) { if (gesture.GetCurrentPickedObject() == gameObject) { if (!fingerOver[gesture.fingerIndex] && ((!isOnTouch && !isMultiTouch) || isMultiTouch)) { fingerOver[gesture.fingerIndex] = true; onTouchEnter.Invoke(gesture); isOnTouch = true; } else if (fingerOver[gesture.fingerIndex]) { onTouchOver.Invoke(gesture); } } else { if (fingerOver[gesture.fingerIndex]) { fingerOver[gesture.fingerIndex] = false; onTouchExit.Invoke(gesture); if (!isMultiTouch) { isOnTouch = false; } } } } else { if (gesture.GetCurrentPickedObject() == gameObject && (!enablePickOverUI && gesture.GetCurrentFirstPickedUIElement() != null)) { if (fingerOver[gesture.fingerIndex]) { fingerOver[gesture.fingerIndex] = false; onTouchExit.Invoke(gesture); if (!isMultiTouch) { isOnTouch = false; } } } } } else { if (gesture.GetCurrentFirstPickedUIElement() == gameObject) { if (!fingerOver[gesture.fingerIndex] && ((!isOnTouch && !isMultiTouch) || isMultiTouch)) { fingerOver[gesture.fingerIndex] = true; onTouchEnter.Invoke(gesture); isOnTouch = true; } else if (fingerOver[gesture.fingerIndex]) { onTouchOver.Invoke(gesture); } } else { if (fingerOver[gesture.fingerIndex]) { fingerOver[gesture.fingerIndex] = false; onTouchExit.Invoke(gesture); if (!isMultiTouch) { isOnTouch = false; } } } } }
// Token: 0x060002E1 RID: 737 RVA: 0x0000DFA8 File Offset: 0x0000C3A8 private void DoAction(Gesture gesture) { if (this.isGestureOnMe) { if (this.realType == QuickBase.GameObjectType.UI) { if (gesture.isOverGui && (gesture.pickedUIElement == base.gameObject || gesture.pickedUIElement.transform.IsChildOf(base.transform))) { this.onTwistAction.Invoke(gesture); if (this.enableSimpleAction) { base.DoDirectAction(this.axisActionValue); } } } else if (((!this.enablePickOverUI && gesture.pickedUIElement == null) || this.enablePickOverUI) && gesture.GetCurrentPickedObject(true) == base.gameObject) { this.onTwistAction.Invoke(gesture); if (this.enableSimpleAction) { base.DoDirectAction(this.axisActionValue); } } } else if ((!this.enablePickOverUI && gesture.pickedUIElement == null) || this.enablePickOverUI) { this.onTwistAction.Invoke(gesture); if (this.enableSimpleAction) { base.DoDirectAction(this.axisActionValue); } } }