Пример #1
0
 public void ChangeNumOfColors(int number)
 {
     Game.numberOfColors = number;
     state = OptionsMenuState.Main;
     numOfColorsPanel.SetActive(false);
     UpdateButtons();
 }
Пример #2
0
 public void Start()
 {
     state = OptionsMenuState.Main;
     controller.EnableCustomGestures(Gesture.GestureType.TYPESCREENTAP, true);
     controller.EnableCustomGestures(Gesture.GestureType.TYPEKEYTAP, true);
     UpdateButtons();
 }
Пример #3
0
 public void ChangeCulture(string culture)
 {
     Game.culture = culture;
     state        = OptionsMenuState.Main;
     culturePanel.SetActive(false);
     UpdateButtons();
 }
Пример #4
0
 private void OpenNumOfColors()
 {
     state = OptionsMenuState.Colors;
     numOfColorsPanel.SetActive(true);
     numOfColorsPanel.GetComponent <NumberPanelScript>().UpdateInterface();
     classifier = Game.GetClassifier(Game.ChooseNumberState());
     Game.StartActionBuffer();
     UpdateButtons();
 }
Пример #5
0
        public void Show(int screenX, int screenY, Graphics.Viewport viewport)
        {
            _viewport = viewport;
            _active   = true;
            _screenX  = screenX - _upperBackground.Width / 2;
            _screenY  = screenY - _upperBackground.Height / 2;

            _state = OptionsMenuState.Initial;

            keepInsideViewport(viewport);
        }
Пример #6
0
        public override void Initialize()
        {
            menuBackground = new menuItem();

            menuItems = new menuItem[int_NumOfOptions];
            for (int i = 0; i < int_NumOfOptions; i++)
            {
               menuItems[i] = new menuItem();
            }

            CurrentWorkerState = OptionsMenuState.AUDIO;
        }
Пример #7
0
        private void onGraphicsOptionsClicked(object sender, EventArgs e)
        {
            if (_state == OptionsMenuState.AdvancedOption)
            {
                _state = OptionsMenuState.GraphicsOptions;
            }
            else
            {
                _state = OptionsMenuState.AdvancedOption;
            }

            keepInsideViewport(_viewport);
        }
Пример #8
0
        private void onOptionsClicked(object sender, EventArgs e)
        {
            if (_state == OptionsMenuState.Initial)
            {
                _state = OptionsMenuState.Options;
            }
            else
            {
                _state = OptionsMenuState.Initial;
            }

            keepInsideViewport(_viewport);
        }
Пример #9
0
 private void OpenCulture()
 {
     state = OptionsMenuState.Culture;
     culturePanel.SetActive(true);
     UpdateButtons();
 }
Пример #10
0
        /// <summary>
        /// Goes back to previous option if skipped to Back
        /// </summary>
        private void CycleUp()
        {
            if (CurrentWorkerState == OptionsMenuState.BACK)
            {
                if (PreviousWorkerState == OptionsMenuState.BACK)
                {
                    CurrentWorkerState = OptionsMenuState.AUDIO;
                }

                else
                {
                    CurrentWorkerState = PreviousWorkerState;
                }
            }

            for (int i = 0; i < int_NumOfOptions; i++)
            {
                if (i == (int)CurrentWorkerState)
                {
                    menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Highlight;

                }
                else
                {
                    menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Original;

                }
            }
        }
Пример #11
0
        /// <summary>
        /// Goes directly to Back options
        /// </summary>
        private void CycleDown()
        {
            if (CurrentWorkerState != OptionsMenuState.BACK)
            {
                PreviousWorkerState = CurrentWorkerState;
                CurrentWorkerState = OptionsMenuState.BACK;
            }

            for (int i = 0; i < int_NumOfOptions; i++)
            {
                if (i == (int)CurrentWorkerState)
                {
                    menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Highlight;

                }
                else
                {
                    menuItems[i].t2d_Texture = menuItems[i].t2d_Texture_Original;

                }
            }
        }
Пример #12
0
 /// <summary>
 /// Puts the worker state on void
 /// </summary>
 public void MenuVoid()
 {
     PreviousWorkerState = CurrentWorkerState;
     CurrentWorkerState = OptionsMenuState.VOID;
 }