private void stateSlide(int value) { if (value > Textures.Slides.Length) { return; } setState(State.Slide); currentSlide = value; //print(string.Format("Current slide: {0}", currentSlide)); foreach (AnimationState ass in slides.animation) { ass.normalizedTime = 0; } slides.animation.enabled = false; setCurrentSlidesTextures(Textures.GetSlides(currentSlide)); if (currentSlide <= 1) { LeftSwipe.Deactivate(); } else { LeftSwipe.Activate(); } if (currentSlide == Textures.Slides.Length) { RightSwipe.Deactivate(); } else { RightSwipe.Activate(); } }