protected override void SwipeHandler(SWIPETYPE ST) { if(ST == SWIPETYPE.LEFT) _panelManager.MoveBack(); else if(ST == SWIPETYPE.RIGHT) _panelManager.MoveForward(); StartCoroutine(delayMovie(.8f)); }
protected virtual void SwipeHandler(SWIPETYPE ST) { if(GetComponent<ImageTargetBehaviour>().CurrentStatus != TrackableBehaviour.Status.TRACKED) return; SB_Album currentAlbum = _panelManager.CurrentPanel.gameObject.GetComponent<SB_Album>(); if(currentAlbum != null) currentAlbum.stopStream(); if(ST == SWIPETYPE.LEFT) _panelManager.MoveBack(); else if(ST == SWIPETYPE.RIGHT) _panelManager.MoveForward(); currentAlbum = _panelManager.CurrentPanel.gameObject.GetComponent<SB_Album>(); if(currentAlbum != null) currentAlbum.startStream(); }
void SwipeComplete(SWIPETYPE swipeType, Touch touch) { //Debug.Log(Time.time - touchInfoArray[touch.fingerId].timeSwipeStarted); Reset(touch); if(timeToSwipe == 0.0f || (timeToSwipe > 0.0f && (Time.time - touchInfoArray[touch.fingerId].timeSwipeStarted) <= timeToSwipe)) { switch(swipeType) { case SWIPETYPE.LEFT: Debug.Log("Swiped Left"); if(SwipeHandler != null) SwipeHandler(SWIPETYPE.LEFT); break; case SWIPETYPE.RIGHT: Debug.Log("Swiped Right"); if(SwipeHandler != null) SwipeHandler(SWIPETYPE.RIGHT); break; } } }