Beispiel #1
0
    public override void Awake()
    {
        Input.simulateMouseWithTouches = false;
        this.Ink = 40;

        Drag.MouseDownStream()
        .Subscribe(position =>
        {
            SubscribeDragStream(position, Drag.MouseDragStream(threshold));
        })
        .AddTo(this.eventResources);

        Drag.TouchStartStream()
        .Subscribe(touch =>
        {
            SubscribeDragStream(Camera.main.ScreenToWorldPoint(touch.Item1.position), Drag.TouchDragStream(touch.Item1.fingerId, threshold));
        })
        .AddTo(this.eventResources);

        base.Awake();
    }