Пример #1
0
    void OnDestroy()
    {
        // コールバック登録解除.
        FallThroughHandler fth = fallThroughHandler;

        fth.onPress      -= OnPress;
        fth.onBeginPress -= OnBeginPress;
        fth.onEndPress   -= OnEndPress;

        fth.onDrag      -= OnDrag;
        fth.onBeginDrag -= OnBeginDrag;
        fth.onEndDrag   -= OnEndDrag;

        fth.onPinch      -= OnPinch;
        fth.onBeginPinch -= OnBeginPinch;
        fth.onEndPinch   -= OnEndPinch;

        fth.onFlick       -= OnFlick;
        fth.onDoubleClick -= OnDoubleClick;
    }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        // コールバック登録.
        FallThroughHandler fth = fallThroughHandler;

        fth.onPress      += OnPress;
        fth.onBeginPress += OnBeginPress;
        fth.onEndPress   += OnEndPress;

        fth.onDrag      += OnDrag;
        fth.onBeginDrag += OnBeginDrag;
        fth.onEndDrag   += OnEndDrag;

        fth.onPinch      += OnPinch;
        fth.onBeginPinch += OnBeginPinch;
        fth.onEndPinch   += OnEndPinch;

        fth.onFlick       += OnFlick;
        fth.onDoubleClick += OnDoubleClick;
    }