private void touchEndedHandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { int id; var touch = metaGestureEventArgs.Touch; if (touch.InputSource == this) return; if (!map.TryGetValue(touch.Id, out id)) return; endTouch(id); }
private void touchMovedhandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { int id; TouchHit hit; var touch = metaGestureEventArgs.Touch; if (touch.InputSource == this) return; if (!map.TryGetValue(touch.Id, out id)) return; if (!gesture.GetTargetHitResult(touch.Position, out hit)) return; moveTouch(id, processCoords(hit.RaycastHit.textureCoord)); }
private void touchEndedHandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { if (Time.time - TouchTime < 300) { this.ExitContactZone(); } TouchTime = 0; }
private void touchBeganHandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { if (TouchTime == 0) { TouchTime = Time.time; this.EnterContactZone(); } }
private void touchBeganHandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { var touch = metaGestureEventArgs.Touch; if (touch.InputSource == this) return; map.Add(touch.Id, beginTouch(processCoords(touch.Hit.RaycastHit.textureCoord), touch.Tags).Id); }
private void OnTouchEvent(object sender, MetaGestureEventArgs e) { shouldSpawn = true; spawnCoords = camera.ScreenToWorldPoint(new Vector3(e.TouchPoint.Position.x, e.TouchPoint.Position.y, camera.farClipPlane)); }
void OnTouchEnded(object sender, MetaGestureEventArgs e) { if (((MetaGesture)sender).State == Gesture.GestureState.Ended) shouldSpawn = false; }
private void touchMovedhandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { var touch = metaGestureEventArgs.Touch; if (this.appeared && !this.collided && !this.resetting) { Vector3 positionTouched = Camera.main.ScreenToWorldPoint(touch.Position); positionTouched.z = 0; this.transform.position = positionTouched; } }
private void touchEndedHandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { TouchTime = 0; }
private void touchBeganHandler(object sender, MetaGestureEventArgs metaGestureEventArgs) { if (TouchTime == 0) { TouchTime = Time.time; } }