private void Start() { //currentPlayer = MoviePlayer1; //prevPlayer = MoviePlayer2; stateIntroSlide(); foreach (AnimationState ass in slides.animation) { ass.normalizedSpeed = 0; ass.normalizedTime = 0; } setCurrentSlidesTextures(Textures.GetSlides(0)); setNextSlidesTextures(Textures.GetSlides(0)); Punch.OnExplosion += OnExplosion; LeftSwipe.OnSwipe += OnSwipe; RightSwipe.OnSwipe += OnSwipe; LeftSwipe.Deactivate(); RightSwipe.Deactivate(); }
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(); } }