// Use this for initialization void Start() { _pan = GetComponent<PanGesture>(); _pan.StateChanged += delegate(object sender, TouchScript.Events.GestureStateChangeEventArgs e) { switch (e.State) { case Gesture.GestureState.Began: case Gesture.GestureState.Changed: transform.position += speed * _pan.WorldDeltaPosition; break; default: break; } }; }
// Use this for initialization void Start() { communicator.BindTracker(this); _pan = GetComponent<PanGesture>(); _pan.StateChanged += delegate(object sender, TouchScript.Events.GestureStateChangeEventArgs e) { switch (e.State) { case Gesture.GestureState.Changed: transform.position += _pan.WorldDeltaPosition; communicator.Send(this); break; } }; }