Exemple #1
0
 protected override IGenerator[] GetNewGenerators()
 {
     return(new IGenerator[]
     {
         new SortedRecordSettingGenerator <int>("Local High Scores", new SortedIntRecords(MaxListSize, true))
         {
             PropertyName = HighScoresPropertyName,
             TooltipDocumentation = new string[]
             {
                 "List of highest scores"
             },
         },
         new PropertyGenerator("TopScore", typeof(IRecord <int>))
         {
             GetterCode = GeneratorDecorator.CreatePropertyWriter(HighScoresPropertyName, "TopRecord"),
             TooltipDocumentation = new string[]
             {
                 "Gets the top score from <seealso cref=\"" + HighScoresPropertyName + "\"/>"
             },
         },
         new StoredStringGenerator("Last Entered Name", string.Empty)
         {
             IsValueRetainedOnClear = true,
             TooltipDocumentation = new string[]
             {
                 "The name the player entered last time they got a new high score.",
                 "Used as a convenience feature for players to enter their name",
                 "more quickly on repeated playthroughs."
             },
         }
     });
 }
 private void WriteGetter(GeneratorDecorator source, GeneratePropertyEventArgs args)
 {
     if (args != null)
     {
         args.WriteTabs();
         args.WriteSingleLine(true, "TotalPlayTime");
     }
 }
Exemple #3
0
 private static void WriteSetter(GeneratorDecorator source, GeneratePropertyEventArgs args)
 {
     if (args != null)
     {
         args.WriteTabs();
         args.WriteSingleLine(false, "SetValue(value, Settings, AppVersion)");
     }
 }
Exemple #4
0
 private static void WriteGetter(GeneratorDecorator source, GeneratePropertyEventArgs args)
 {
     if (args != null)
     {
         args.WriteTabs();
         args.WriteSingleLine(true, "Value");
     }
 }
 protected override IGenerator[] GetNewGenerators()
 {
     return(new IGenerator[]
     {
         /////////////////////////////////////////////////////
         // Keyboard Stuff
         /////////////////////////////////////////////////////
         new StoredBoolGenerator("Split Keyboard Axis", false)
         {
             PropertyName = "IsKeyboardAxisSensitivitySplit",
             IsValueRetainedOnClear = true,
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, splits the keyboard's X- and Y-axis' sensitivity"
             }
         },
         new StoredFloatGenerator("Keyboard X-Axis Sensitivity", DefaultSensitivity)
         {
             IsValueRetainedOnClear = true,
             Processor = Clamp <float> .Get(0, 1),
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "The keyboard's X-axis' sensitivity.",
                 "A value between 0 and 1."
             }
         },
         new StoredFloatGenerator("Keyboard Y-Axis Sensitivity", DefaultSensitivity)
         {
             IsValueRetainedOnClear = true,
             Processor = Clamp <float> .Get(0, 1),
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "The keyboard's Y-axis' sensitivity.",
                 "A value between 0 and 1.",
                 "This value isn't used if <see cref=\"IsKeyboardAxisSensitivitySplit\"/> is false."
             }
         },
         new StoredBoolGenerator("Keyboard X-Axis is Inverted", false)
         {
             IsValueRetainedOnClear = true,
             PropertyName = "IsKeyboardXAxisInverted",
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, inverts the keyboard's X-axis."
             }
         },
         new StoredBoolGenerator("Keyboard Y-Axis is Inverted", false)
         {
             IsValueRetainedOnClear = true,
             PropertyName = "IsKeyboardYAxisInverted",
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, inverts the keyboard's Y-axis."
             }
         },
         /////////////////////////////////////////////////////
         // Mouse Stuff
         /////////////////////////////////////////////////////
         new StoredBoolGenerator("Split Mouse Axis", false)
         {
             IsValueRetainedOnClear = true,
             PropertyName = "IsMouseAxisSensitivitySplit",
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, splits the mouse's X- and Y-axis' sensitivity"
             }
         },
         new StoredFloatGenerator("Mouse X-Axis Sensitivity", DefaultSensitivity)
         {
             IsValueRetainedOnClear = true,
             Processor = Clamp <float> .Get(0, 1),
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "The mouse's X-axis' sensitivity.",
                 "A value between 0 and 1."
             }
         },
         new StoredFloatGenerator("Mouse Y-Axis Sensitivity", DefaultSensitivity)
         {
             IsValueRetainedOnClear = true,
             Processor = Clamp <float> .Get(0, 1),
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "The keyboard's Y-axis' sensitivity.",
                 "A value between 0 and 1.",
                 "This value isn't used if <see cref=\"IsKeyboardAxisSensitivitySplit\"/> is false."
             }
         },
         new StoredBoolGenerator("Mouse X-Axis is Inverted", false)
         {
             IsValueRetainedOnClear = true,
             PropertyName = "IsMouseXAxisInverted",
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, inverts the keyboard's X-axis."
             }
         },
         new StoredBoolGenerator("Mouse Y-Axis is Inverted", false)
         {
             IsValueRetainedOnClear = true,
             PropertyName = "IsMouseYAxisInverted",
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, inverts the keyboard's Y-axis."
             }
         },
         SmoothCameraFactorOptionProperty,
         IsSmoothCameraEnabledProperty,
         new PropertyGenerator(CameraSmoothFactorPropertyName, typeof(float))
         {
             GetterCode = GeneratorDecorator.CreatePropertyWriter(ClassName, CameraSmoothFactorPropertyName),
             TooltipDocumentation = new string[]
             {
                 "The amount to apply the camera smoothing. Zero indicates instant-snapping to mouse."
             },
         },
         /////////////////////////////////////////////////////
         // Scroll Wheel Stuff
         /////////////////////////////////////////////////////
         new StoredFloatGenerator("Scroll Wheel Sensitivity", DefaultSensitivity)
         {
             IsValueRetainedOnClear = true,
             Processor = Clamp <float> .Get(0, 1),
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "The mouse' scroll wheel's sensitivity.",
                 "A value between 0 and 1."
             }
         },
         new StoredBoolGenerator("Scroll Wheel is Inverted", false)
         {
             IsValueRetainedOnClear = true,
             PropertyName = "IsScrollWheelInverted",
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, inverts the mouse' scroll wheel."
             }
         },
         /////////////////////////////////////////////////////
         // Graphics Stuff
         /////////////////////////////////////////////////////
         IsCameraShakesEnabledProperty,
         IsHeadBobbingOptionEnabledProperty,
         new PropertyGenerator(IsHeadingBobbingEnabledPropertyName, typeof(bool))
         {
             GetterCode = GeneratorDecorator.CreatePropertyWriter(ClassName, IsHeadingBobbingEnabledPropertyName),
             TooltipDocumentation = new string[]
             {
                 "If true, enables head bobbing camera effect."
             },
         },
         new StoredBoolGenerator("Is Screen Flashes Enabled", true)
         {
             IsValueRetainedOnClear = true,
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, enables flashing graphic effects."
             }
         },
         new StoredBoolGenerator("Is Motion Blurs Enabled", true)
         {
             IsValueRetainedOnClear = true,
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, enables motion blur graphic effects."
             }
         },
         new StoredBoolGenerator("Is Bloom Effect Enabled", true)
         {
             IsValueRetainedOnClear = true,
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, enables bloom graphic effects."
             }
         },
         /////////////////////////////////////////////////////
         // Accessibility Stuff
         /////////////////////////////////////////////////////
         new StoredFloatGenerator("Text Size Multiplier", DefaultScale)
         {
             IsValueRetainedOnClear = true,
             Processor = Clamp <float> .Get(0.5f, 1.5f),
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "Multiplier on how much the font size of a text should change."
             }
         },
         new StoredBoolGenerator("Is Invincibility Mode Enabled", false)
         {
             IsValueRetainedOnClear = true,
             SetterScope = AccessModifier.Internal,
             TooltipDocumentation = new string[]
             {
                 "If true, enables invincibility mode; this accessibility feature prevents the player's health from decreasing!"
             }
         },
         CustomTimeScaleOptionProperty,
         IsCustomTimeScaleEnabledProperty,
         new PropertyGenerator(CustomTimeScalePropertyName, typeof(float))
         {
             GetterCode = GeneratorDecorator.CreatePropertyWriter(ClassName, CustomTimeScalePropertyName),
             TooltipDocumentation = new string[]
             {
                 "The default global time scale for the game."
             },
         },
     });
 }