Esempio n. 1
0
        /// <summary>
        /// Event fires when the currently viewed page changes, also updates while the scroll is moving
        /// </summary>
        internal void ScreenChange()
        {
            if (_currentPage == 0)
            {
                b1.transform.GetChild(0).GetComponent <Image>().color = Color.red;
                b2.transform.GetChild(0).GetComponent <Image>().color = Color.black;
                b3.transform.GetChild(0).GetComponent <Image>().color = Color.black;
            }
            else if (_currentPage == 1)
            {
                b1.transform.GetChild(0).GetComponent <Image>().color = Color.black;
                b2.transform.GetChild(0).GetComponent <Image>().color = Color.red;
                b3.transform.GetChild(0).GetComponent <Image>().color = Color.black;
            }
            else if (_currentPage == 2)
            {
                b1.transform.GetChild(0).GetComponent <Image>().color = Color.black;
                b2.transform.GetChild(0).GetComponent <Image>().color = Color.black;
                b3.transform.GetChild(0).GetComponent <Image>().color = Color.red;
            }

            OnSelectionPageChangedEvent.Invoke(_currentPage);
        }
Esempio n. 2
0
 /// <summary>
 /// Event fires when the currently viewed page changes, also updates while the scroll is moving
 /// </summary>
 internal void ScreenChange()
 {
     OnSelectionPageChangedEvent.Invoke(_currentPage);
 }