Exemplo n.º 1
0
        public virtual void Slider_Set(ControlsE con, SliderControls part, int value)
        {
            if (con == ControlsE.GainS)
            {
                switch (part)
                {
                case SliderControls.Maximum:
                    GainSlider.Maximum = value;
                    break;

                case SliderControls.Minimum:
                    GainSlider.Minimum = value;
                    break;

                case SliderControls.Value:
                    GainSlider.Value = value;
                    break;

                case SliderControls.TickFrequency:
                    GainSlider.TickFrequency = value;
                    break;
                }
            }
            else if (con == ControlsE.ExposureS)
            {
                switch (part)
                {
                case SliderControls.Maximum:
                    ExposureSlider.Maximum = value;
                    break;

                case SliderControls.Minimum:
                    ExposureSlider.Minimum = value;
                    break;

                case SliderControls.Value:
                    ExposureSlider.Value = value;
                    break;

                case SliderControls.TickFrequency:
                    ExposureSlider.TickFrequency = value;
                    break;
                }
            }
            else
            {
                throw new Exception("Not a SLider in CamView");
            }
        }
Exemplo n.º 2
0
 void Update()
 {
     if (shouldMakeWave())
     {
         //cooldownTimer = cooldownLengthSeconds;
         //Vector3 playerPos3 = player.transform.position;
         //Vector2 playerPos2 = new Vector2(playerPos3.x, playerPos3.y);
         //StartCoroutine(CreateWave(playerPos2));
         makeWaveByPitch(SliderControls.getValue());
         //wavesRemaining--;
         //waveText.changeTextDisplay(wavesRemaining);
     }
     cooldownTimer -= Time.deltaTime;
     UpdateFloorTiles();
     UpdateGuardReveals();
     CheckGoalRevealed();
 }
Exemplo n.º 3
0
        private void Sliders_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            parent.Children.Clear();
            SliderControls.Clear();

            for (int i = 0; Sliders.Count > i; i++)
            {
                Slider s = new Slider();
                s.Visibility    = Visibility.Hidden;
                s.Value         = Sliders[i];
                s.Minimum       = Minimum;
                s.Maximum       = Maximum;
                s.ValueChanged += Slider_ValueChanged;
                parent.Children.Add(s);
                SliderControls.Add(s);
            }

            CalcMargin();
        }
Exemplo n.º 4
0
        public virtual int Slider_Get(ControlsE con, SliderControls part)
        {
            if (con == ControlsE.GainS)
            {
                switch (part)
                {
                case SliderControls.Maximum:
                    return(GainSlider.Maximum);

                case SliderControls.Minimum:
                    return(GainSlider.Minimum);

                case SliderControls.Value:
                    return(GainSlider.Value);

                case SliderControls.TickFrequency:
                    return(GainSlider.TickFrequency);
                }
            }
            else if (con == ControlsE.ExposureS)
            {
                switch (part)
                {
                case SliderControls.Maximum:
                    return(ExposureSlider.Maximum);

                case SliderControls.Minimum:
                    return(ExposureSlider.Minimum);

                case SliderControls.Value:
                    return(ExposureSlider.Value);

                case SliderControls.TickFrequency:
                    return(ExposureSlider.TickFrequency);
                }
            }
            else
            {
                throw new Exception("Not a SLider in CamView");
            }
            return(-1);
        }