IEnumerator Wait() { UnityEngine.Debug.Log("Next Page " + gameObject); yield return(new WaitForSeconds(TransitionTime)); switch (option) { case PageButtonOption.Next: _pagesController.GoToNextPage(); break; case PageButtonOption.Previous: _pagesController.GoToPreviousPage(); break; case PageButtonOption.Especific: _pagesController.OpenPageById(Especific); break; case PageButtonOption.Type: _pagesController.OpenPageByType(Type); break; } }
IEnumerator Wait() { _routineIsRunning = true; yield return(new WaitForSeconds(TransitionTime)); switch (Option) { case PageButtonOption.Next: _pagesController.GoToNextPage(); break; case PageButtonOption.Previous: _pagesController.GoToPreviousPage(); break; case PageButtonOption.Especific: _pagesController.OpenPageById(Especific); break; case PageButtonOption.Type: if (Type == PageType.Generic) { break; } _pagesController.OpenPageByType(Type); break; } _routineIsRunning = false; }
void CheckPage() { UnityEngine.Debug.Log("eaeeeeeeeeeeeeee"); if (!_routineIsRunning && _pagesController.actualPage == _id) { switch (option) { case PageButtonOption.Next: _pagesController.GoToNextPage(); break; case PageButtonOption.Previous: _pagesController.GoToPreviousPage(); break; case PageButtonOption.Especific: _pagesController.OpenPageById(Especific); break; case PageButtonOption.Type: _pagesController.OpenPageByType(Type); break; } } }
IEnumerator End() { yield return(new WaitForSeconds(delay)); switch (option) { case PageButtonOption.Next: _pagesController.GoToNextPage(); break; case PageButtonOption.Previous: _pagesController.GoToPreviousPage(); break; case PageButtonOption.Especific: _pagesController.OpenPageById(Especific); break; case PageButtonOption.Type: _pagesController.OpenPageByType(Type); break; } }
protected override void OnClick() { base.OnClick(); switch (option) { case PageButtonOption.Next: _pagesController.GoToNextPage(); break; case PageButtonOption.Previous: _pagesController.GoToPreviousPage(); break; case PageButtonOption.Especific: _pagesController.OpenPageById(Especific); break; case PageButtonOption.Type: _pagesController.OpenPageByType(Type); break; } }