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));
 }
Ejemplo n.º 3
0
 private void touchEndedHandler(object sender, MetaGestureEventArgs metaGestureEventArgs)
 {
     if (Time.time - TouchTime < 300)
     {
         this.ExitContactZone();
     }
     TouchTime = 0;
 }
Ejemplo n.º 4
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);
 }
Ejemplo n.º 6
0
 private void OnTouchEvent(object sender, MetaGestureEventArgs e)
 {
     shouldSpawn = true;
     spawnCoords = camera.ScreenToWorldPoint(new Vector3(e.TouchPoint.Position.x, e.TouchPoint.Position.y, camera.farClipPlane));
 }
Ejemplo n.º 7
0
 void OnTouchEnded(object sender, MetaGestureEventArgs e)
 {
     if (((MetaGesture)sender).State == Gesture.GestureState.Ended) shouldSpawn = false;
 }
Ejemplo n.º 8
0
 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;
     }
 }
Ejemplo n.º 9
0
 private void touchEndedHandler(object sender, MetaGestureEventArgs metaGestureEventArgs)
 {
     TouchTime = 0;
 }
Ejemplo n.º 10
0
 private void touchBeganHandler(object sender, MetaGestureEventArgs metaGestureEventArgs)
 {
     if (TouchTime == 0)
     {
         TouchTime = Time.time;
     }
 }