//		BorderScript borderScript;

        public void Awake()
        {
            cam = MobileTouchCamera.Instance.main;
            mobileTouchCamera       = cam.GetComponent <MobileTouchCamera> ();
            touchInputController    = cam.GetComponent <TouchInputController> ();
            mobilePickingController = cam.GetComponent <MobilePickingController> ();

            #region detail callbacks
            touchInputController.OnInputClick          += OnInputClick;
            touchInputController.OnDragStart           += OnDragStart;
            touchInputController.OnDragStop            += OnDragStop;
            touchInputController.OnDragUpdate          += OnDragUpdate;
            touchInputController.OnFingerDown          += OnFingerDown;
            touchInputController.OnPinchStart          += OnPinchStart;
            touchInputController.OnPinchStop           += OnPinchStop;
            touchInputController.OnPinchUpdateExtended += new TouchInputController.PinchUpdateExtendedDelegate(OnPinchUpdate);
            #endregion
        }
예제 #2
0
        public void Awake()
        {
            cam = FindObjectOfType <Camera>();
            mobileTouchCamera       = cam.GetComponent <MobileTouchCamera>();
            touchInputController    = cam.GetComponent <TouchInputController>();
            mobilePickingController = cam.GetComponent <MobilePickingController>();

            #region detail callbacks
            touchInputController.OnInputClick  += new TouchInputController.InputClickDelegate(OnInputClick);
            touchInputController.OnDragStart   += new TouchInputController.Input1PositionDelegate(OnDragStart);
            touchInputController.OnDragStop    += new TouchInputController.DragStopDelegate(OnDragStop);
            touchInputController.OnDragUpdate  += new TouchInputController.DragUpdateDelegate(OnDragUpdate);
            touchInputController.OnFingerDown  += new TouchInputController.Input1PositionDelegate(OnFingerDown);
            touchInputController.OnPinchStart  += new TouchInputController.PinchStartDelegate(OnPinchStart);
            touchInputController.OnPinchStop   += new System.Action(OnPinchStop);
            touchInputController.OnPinchUpdate += new TouchInputController.PinchUpdateDelegate(OnPinchUpdate);
            #endregion

            ShowInfoText("Mobile Touch Camera Demo\nSwipe: Scroll\nPinch: Zoom\nTap: Pick Item", 5);
        }
예제 #3
0
        public void Awake()
        {
            Application.targetFrameRate = 60;

            cam = FindObjectOfType <Camera>();
            mobileTouchCamera       = cam.GetComponent <MobileTouchCamera>();
            touchInputController    = cam.GetComponent <TouchInputController>();
            mobilePickingController = cam.GetComponent <MobilePickingController>();

            #region detail callbacks
            touchInputController.OnInputClick          += OnInputClick;
            touchInputController.OnDragStart           += OnDragStart;
            touchInputController.OnDragStop            += OnDragStop;
            touchInputController.OnDragUpdate          += OnDragUpdate;
            touchInputController.OnFingerDown          += OnFingerDown;
            touchInputController.OnPinchStart          += OnPinchStart;
            touchInputController.OnPinchStop           += OnPinchStop;
            touchInputController.OnPinchUpdateExtended += new TouchInputController.PinchUpdateExtendedDelegate(OnPinchUpdate);
            #endregion

            ShowInfoText("Mobile Touch Camera Demo\nSwipe: Scroll\nPinch: Zoom\nTap: Pick Item", introTextOnScreenTime);
        }