|
WKLib 0.2.3
A modding library for White Knuckle
|
A fluent builder class for creating and configuring an M_Gamemode instance.
It allows setting various properties of a gamemode such as regions, name, intro text, and gameplay flags in a chainable manner before finally building the M_Gamemode object.
More...
Collaboration diagram for WKLib.API.Gamemodes.GamemodeBuilder:Public Member Functions | |
| GamemodeBuilder | WithRegions (List< M_Region > regions) |
| Sets the list of regions for this gamemode. | |
| GamemodeBuilder | WithName (string modeName) |
| Sets the displayed name of the gamemode (which can also serves as the capsule name) | |
| GamemodeBuilder | WithIntroText (string introText) |
| Sets the intro text for the gamemode This text is shown when loaded into the gamemode. | |
| GamemodeBuilder | IsEndless (bool isEndless) |
| Sets whether the gamemode should be endless. | |
| GamemodeBuilder | HasPerks (bool hasPerks) |
| Sets whether perks are available in this gamemode. | |
| GamemodeBuilder | HasRevives (bool hasRevives) |
| Sets whether revives are available in this gamemode. | |
| GamemodeBuilder | WithCapsuleSprite (Sprite sprite) |
| Provides a Sprite to use for the gamemode's capsule art. | |
| GamemodeBuilder | WithScreenArt (Sprite sprite) |
| Provides a Sprite to use for the gamemode's screen art. | |
| GamemodeBuilder | WithStartItems (List< M_Gamemode.SpawnItem > spawnItems) |
| Sets the list of items players will start with when entering this gamemode. | |
| GamemodeBuilder | WithGameType (string gameType) |
| Sets the game type for the gamemode based on a string input. | |
| M_Gamemode | Build () |
| Constructs and returns a new M_Gamemode instance based on the properties configured in this builder. | |
A fluent builder class for creating and configuring an M_Gamemode instance.
It allows setting various properties of a gamemode such as regions, name, intro text, and gameplay flags in a chainable manner before finally building the M_Gamemode object.
Definition at line 14 of file GamemodeBuilder.cs.
| M_Gamemode WKLib.API.Gamemodes.GamemodeBuilder.Build | ( | ) |
Constructs and returns a new M_Gamemode instance based on the properties configured in this builder.
Definition at line 155 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.HasPerks | ( | bool | hasPerks | ) |
Sets whether perks are available in this gamemode.
| hasPerks | A boolean value indicating if perks are enabled |
Definition at line 77 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.HasRevives | ( | bool | hasRevives | ) |
Sets whether revives are available in this gamemode.
| hasRevives | A boolean value indicating if revives are enabled |
Definition at line 88 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.IsEndless | ( | bool | isEndless | ) |
Sets whether the gamemode should be endless.
| isEndless | A boolean value indicating if the gamemode is endless |
Definition at line 66 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.WithCapsuleSprite | ( | Sprite | sprite | ) |
Provides a Sprite to use for the gamemode's capsule art.
| sprite | The Sprite to set as the capsule art |
Definition at line 99 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.WithGameType | ( | string | gameType | ) |
Sets the game type for the gamemode based on a string input.
| gameType | A string representing the desired game type (e.g., "endless", "standard", "playlist", "playlist-shuffle", "single") |
The string input is case-insensitive and mapped to the corresponding M_Gamemode.GameType enum value
If an unknown string is provided, the existing _gameType value is retained (auto-chosen)
Definition at line 136 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.WithIntroText | ( | string | introText | ) |
Sets the intro text for the gamemode
This text is shown when loaded into the gamemode.
| introText | The introductory text |
Definition at line 55 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.WithName | ( | string | modeName | ) |
Sets the displayed name of the gamemode (which can also serves as the capsule name)
| modeName | The desired name for the gamemode |
Definition at line 43 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.WithRegions | ( | List< M_Region > | regions | ) |
Sets the list of regions for this gamemode.
| regions | A List<T> of M_Region instances to be used in the gamemode |
Definition at line 32 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.WithScreenArt | ( | Sprite | sprite | ) |
Provides a Sprite to use for the gamemode's screen art.
| sprite | The Sprite to set as the screen art |
Definition at line 110 of file GamemodeBuilder.cs.
| GamemodeBuilder WKLib.API.Gamemodes.GamemodeBuilder.WithStartItems | ( | List< M_Gamemode.SpawnItem > | spawnItems | ) |
Sets the list of items players will start with when entering this gamemode.
| spawnItems | A List<T> of M_Gamemode.SpawnItem defining the initial inventory |
Definition at line 121 of file GamemodeBuilder.cs.