Example #1
0
    // Use this for initialization
    protected virtual void Start()
    {
        PressGesture press = gameObject.AddComponent <PressGesture> ();

        press.Pressed += TouchEvent;

        PanGesture pan = gameObject.AddComponent <PanGesture> ();

        pan.Panned += TouchEvent;

        TapGesture tap = gameObject.AddComponent <TapGesture>();

        tap.Tapped += TouchEvent;
        tap.NumberOfTapsRequired = 2;
        tap.TimeLimit            = 0.5f;

        ScaleGesture scale = gameObject.AddComponent <ScaleGesture> ();

        scale.Scaled += TouchEvent;

        gameObject.AddComponent <PressGesture>().Pressed += TouchEvent;

        LongPressGesture longPress = gameObject.AddComponent <LongPressGesture>();

        longPress.LongPressed += TouchEvent;
        longPress.TimeToPress  = 0.2f;
        longPress.AddFriendlyGesture(pan);

        gameObject.AddComponent <ReleaseGesture>().Released += TouchEvent;
    }
Example #2
0
    // Use this for initialization

    void Start()
    {
        ScaleGesture sg = gameObject.AddComponent <ScaleGesture> ();

        sg.Scaled += HandleZoom;

        PanGesture pg = gameObject.AddComponent <PanGesture> ();

        pg.MovementThreshold = 0.25F;
        pg.Panned           += HandlePanned;

        LongPressGesture lpg = gameObject.AddComponent <LongPressGesture> ();

        lpg.LongPressed += HandleLongPressed;
        lpg.AddFriendlyGesture(pg);

        ReleaseGesture rg = gameObject.AddComponent <ReleaseGesture> ();

        rg.Released += HandleReleased;
    }
Example #3
0
    // Use this for initialization
    void Start()
    {
        rh.LoadConfigurations();
        reloadScene();

        PressGesture press = gameObject.AddComponent <PressGesture> ();

        press.Pressed += TouchEvent;

        PanGesture pan = gameObject.AddComponent <PanGesture> ();

        pan.Panned += TouchEvent;
        //pan.MovementThreshold = 0;

        TapGesture tap = gameObject.AddComponent <TapGesture>();

        tap.Tapped += TouchEvent;
        tap.NumberOfTapsRequired = 2;
        tap.TimeLimit            = 0.5f;

        ScaleGesture scale = gameObject.AddComponent <ScaleGesture> ();

        scale.Scaled += TouchEvent;
        //scale.MinPointsDistance = 0;

        gameObject.AddComponent <PressGesture>().Pressed += TouchEvent;

        LongPressGesture longPress = gameObject.AddComponent <LongPressGesture>();

        longPress.LongPressed += TouchEvent;
        longPress.TimeToPress  = 0.2f;
        longPress.AddFriendlyGesture(pan);

        gameObject.AddComponent <ReleaseGesture>().Released += TouchEvent;

        FirstController.getGlobalFirstController().dRegenButtonClicked.Add(onRegen);
        FirstController.getGlobalFirstController().dOrderButtonClicked.Add(onOrderRoom);
    }