/// <summary> /// This controls the pre-selected transition effect. /// </summary> void ExecuteOutTransition() { //textureObject.mainTexture = FileTools.OpenFileAsTexture(picViewerContainer.PictureList[currentSlide].FileName); switch ((int)transitionEffect) { case 0: swipeIn.SwipeTexture(0, 0, swipeLeftOutToX, swipeLeftOutToY, textureObject.GetComponent <TweenPosition>()); //swipe out PrepImage(); swipeIn.SwipeTexture(swipeLeftInFromX, swipeLeftInFromY, 0, 0, textureObject2.GetComponent <TweenPosition>()); //swipe in break; case 1: swipeIn.SwipeTexture(0, 0, swipeRightOutToX, swipeRightOutToY, textureObject.GetComponent <TweenPosition>()); //swipe out PrepImage(); swipeIn.SwipeTexture(swipeRightInFromX, swipeRightInFromY, 0, 0, textureObject2.GetComponent <TweenPosition>()); //swipe in break; case 2: swipeIn.SwipeTexture(0, 0, swipeDownOutToX, swipeDownOutToY, textureObject.GetComponent <TweenPosition>()); //swipe out PrepImage(); swipeIn.SwipeTexture(swipeDownInFromX, swipeDownInFromY, 0, 0, textureObject2.GetComponent <TweenPosition>()); //swipe in break; case 3: swipeIn.SwipeTexture(0, 0, swipeUpOutToX, swipeUpOutToY, textureObject.GetComponent <TweenPosition>()); //swipe out PrepImage(); swipeIn.SwipeTexture(swipeUpInFromX, swipeUpInFromY, 0, 0, textureObject2.GetComponent <TweenPosition>()); //swipe in break; case 4: //Debug.Log("Out"); PrepImage(); fadeIn.FadeTextureOut(textureObject.GetComponent <TweenAlpha>()); break; } }