Esempio n. 1
0
        void AddCVars()
        {
            CVar cvar = new CVar();

            cvar.name     = "FFA";
            cvar.getValue = () => FFA;
            cvar.setValue = (arg) => FFA = (bool)arg;

            CVarManager.AddCVar(cvar);

            cvar = new CVar();

            cvar.name     = "Friendly fire";
            cvar.getValue = () => FriendlyFire;
            cvar.setValue = (arg) => FriendlyFire = (bool)arg;

            CVarManager.AddCVar(cvar);
        }
Esempio n. 2
0
        void AddCvars()
        {
            CVar cvar = new CVar();

            cvar.name     = "nick";
            cvar.getValue = () => Nick;
            cvar.setValue = (arg) => Nick = (string)arg;
            cvar.isValid  = (arg) => PlayerManager.IsValidPlayerName((string)arg);

            CVarManager.AddCVar(cvar);

            cvar          = new CVar();
            cvar.name     = "fps_max";
            cvar.minValue = 1;
            cvar.maxValue = 100;
            cvar.getValue = () => Fps_max;
            cvar.setValue = (arg) => Fps_max = (int)arg;

            CVarManager.AddCVar(cvar);

            if (this.registerInputCvars)
            {
                cvar          = new CVar();
                cvar.name     = "mouse_sensitivity_x";
                cvar.minValue = 0;
                cvar.maxValue = 2000;
                cvar.getValue = () => Mouse_sensitivity_x;
                cvar.setValue = (arg) => Mouse_sensitivity_x = (float)arg;

                CVarManager.AddCVar(cvar);

                cvar          = new CVar();
                cvar.name     = "mouse_sensitivity_y";
                cvar.minValue = 0;
                cvar.maxValue = 2000;
                cvar.getValue = () => Mouse_sensitivity_y;
                cvar.setValue = (arg) => Mouse_sensitivity_y = (float)arg;

                CVarManager.AddCVar(cvar);

                cvar          = new CVar();
                cvar.name     = "Accelerometer minimum horizontal value";
                cvar.minValue = 0;
                cvar.maxValue = 1;
                cvar.getValue = () => MinAccHorizontalValue;
                cvar.setValue = (arg) => MinAccHorizontalValue = (float)arg;

                CVarManager.AddCVar(cvar);

                cvar          = new CVar();
                cvar.name     = "Accelerometer minimum vertical value";
                cvar.minValue = 0;
                cvar.maxValue = 1;
                cvar.getValue = () => MinAccVerticalValue;
                cvar.setValue = (arg) => MinAccVerticalValue = (float)arg;

                CVarManager.AddCVar(cvar);

                cvar          = new CVar();
                cvar.name     = "Accelerometer vertical offset";
                cvar.minValue = 0;
                cvar.maxValue = 1;
                cvar.getValue = () => AccVerticalOffset;
                cvar.setValue = (arg) => AccVerticalOffset = (float)arg;

                CVarManager.AddCVar(cvar);
            }
        }