Skip to content

MrPifo/DifficultyFloat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Difficulty based Float

This repository offers a solution to make adjusting difficulties in Unity a bit easier.

FloatGrade.cs

  • FloatGrade is a class that holds a List filled with one value for each defined Difficulty.
  • FloatGrade.Value returns the currently selected difficulty float value.
  • Use FloatGrade.SetDifficulty(difficulty) to change the selected difficulty.
  • Use the extension method from DifficultyExtension and call this.SetDifficulty(difficulty) on any Object that contains a FloatGrade field. Afterwards every FloatGrade field will be automaticially changed to the new difficulty, which makes it easier to adjust all FloatGrades at the same time.

Example of a collaped Field:

Collapsed Property

Example of an expanded Field:

Expanded Property
The current selected difficulty will be highlighted in color. You change it with the dropdown right next to it. The disabled field shows what Value would be returned at the moment.

Difficulty.cs

Contains the different available Difficulties. Add, Remove or Change as many Difficulties as you like. The inspector will automaticially adapt to it. Although be sure to use Refactoring instead of manually changing it, otherwise it may break existing code of yours.
Enum

About

This repository contains 2 Unity scripts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages