Chromatics.Chromatics.flashState C# (CSharp) Method

flashState() public method

public flashState ( string type, int _maxtick, int _tickspeed ) : void
type string
_maxtick int
_tickspeed int
return void
        public void flashState(string type, int _maxtick, int _tickspeed)
        {
            if (Trigger == false)
            {
                Trigger = true;
                tickstart = true;
                if (DPSparse == true)
                {
                    updateState("static", btn_DPSLimitCol.BackColor, btn_defaultCol.BackColor);
                    flashloop = new System.Timers.Timer();
                    flashloop.Elapsed += (source, e) => { flashF(source, _maxtick, type); };
                    flashloop.Interval = _tickspeed;
                    flashloop.Enabled = true;
                }
                else if (state == 2)
                {
                    updateState("static", btn_emnityCol.BackColor, btn_defaultCol.BackColor);
                    flashloop = new System.Timers.Timer();
                    flashloop.Elapsed += (source, e) => { flashB(source, _maxtick, type); };
                    flashloop.Interval = _tickspeed;
                    flashloop.Enabled = true;
                }
                else if (state == 3)
                {
                    updateState("wave", btn_defaultCol.BackColor, btn_defaultCol.BackColor);
                    flashloop = new System.Timers.Timer();
                    flashloop.Elapsed += (source, e) => { flashC(source, _maxtick, type); };
                    flashloop.Interval = _tickspeed;
                    flashloop.Enabled = true;
                }
                else if (state == 4)
                {
                    updateState("breath", btn_raidEffectsA.BackColor, btn_raidEffectsB.BackColor);
                    flashloop = new System.Timers.Timer();
                    flashloop.Elapsed += (source, e) => { flashD(source, _maxtick, type); };
                    flashloop.Interval = _tickspeed;
                    flashloop.Enabled = true;
                }
                else if (state == 6)
                {
                    skyWatcher.Enabled = false;
                    setWeather(calculateWeather(currentZone));
                    flashloop = new System.Timers.Timer();
                    flashloop.Elapsed += (source, e) => { flashE(source, _maxtick, type); };
                    flashloop.Interval = _tickspeed;
                    flashloop.Enabled = true;
                }
                else
                {
                    updateState("static", btn_defaultCol.BackColor, btn_defaultCol.BackColor);
                    flashloop = new System.Timers.Timer();
                    flashloop.Elapsed += (source, e) => { flashA(source, _maxtick, type); };
                    flashloop.Interval = _tickspeed;
                    flashloop.Enabled = true;
                }
            }
        }
Chromatics