Mad Level Manager

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Enumerations Enumerator Properties Events
Public Types | Public Member Functions | Static Public Member Functions | Properties | List of all members
MadLevelManager.MadLevel Class Reference

Level access & loading routines. More...

## Public Types
enum | Type { Other, Level, Extra }

## Public Member Functions
delegate bool | LevelPredicate (MadLevelConfiguration.Level level)

## Static Public Member Functions
static void | ReloadCurrent ()
| Reloads current level. More...
static AsyncOperation | ReloadCurrentAsync ()
| Reloads the current level asynchronously in the background. This function requires Unity Pro. More...
static void | LoadLevelByName (string levelName)
| Loads level by its name defined in level configuration. More...
static AsyncOperation | LoadLevelByNameAsync (string levelName)
| Loads level by its name defined in level configuration asynchronously in the background. This function requires Unity Pro. More...
static bool | HasNext ()
| Determines whether there is next level present in level configuration (are there any other levels further ahead?) More...
static bool | HasNext (Type levelType)
| Determines whether there is next level present of the specified levelType in level configuration (are there any other levels further ahead?) More...
static void | LoadNext ()
| Loads next level defined in level configuration. More...
static AsyncOperation | LoadNextAsync ()
| Loads next level defined in level configuration asynchronously in the background. This function requires Unity Pro. More...
static void | LoadNext (Type levelType)
| Loads first level with type More...
static AsyncOperation | LoadNextAsync (Type levelType)
| Loads first level with type More...
static bool | HasPrevious ()
| Determines whether there is previous level present in level configuration (are there any other levels before this one?) More...
static bool | HasPrevious (Type levelType)
| Determines whether there is previous level present of the specified levelType in level configuration (are there any other levels further ahead?) More...
static void | LoadPrevious ()
| Loads previous level defined in level configuration. More...
static AsyncOperation | LoadPreviousAsync ()
| Loads previous level defined in level configuration asynchronously in the background. This function requires Unity Pro. More...
static void | LoadPrevious (Type levelType)
| Loads first level with type More...
static AsyncOperation | LoadPreviousAsync (Type levelType)
| Loads first level with type More...
static bool | HasFirst ()
| Tells if there is at least one level set in active level configuration. More...
static bool | HasFirst (Type levelType)
| Tells if there is at least one level of type More...
static void | LoadFirst ()
| Loads the first level set in level configuration. More...
static AsyncOperation | LoadFirstAsync ()
| Loads the first level set in level configuration asynchronously in the background. This function requires Unity Pro. More...
static void | LoadFirst (Type levelType)
| Loads the first level of type More...
static AsyncOperation | LoadFirstAsync (Type levelType)
| Loads the first level of type More...
static string[] | GetAllLevelNames ()
| Gets the all defined level names. More...
static string[] | GetAllLevelNames (MadLevel.Type type)
| Gets the all defined level names of given type. More...
static string | FindFirstCompletedLevelName ()
| Finds the first completed level (in the order). More...
static string | FindLastCompletedLevelName ()
| Finds the last completed level (in the order). More...
static string | FindFirstLockedLevelName ()
| Finds the first locked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time. More...
static string | FindLastLockedLevelName ()
| Finds the last locked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time. More...
static string | FindFirstUnlockedLevelName ()
| Finds the first unlocked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time. More...
static string | FindLastUnlockedLevelName ()
| Finds the last unlocked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time. More...
static string | FindFirstLevelName (LevelPredicate predicate)
| Finds the first name of the level, that predicate returns More...
static string | FindFirstLevelName (MadLevel.Type levelType)
| Finds the first name of the level of given More...
static string | FindLastLevelName (LevelPredicate predicate)
| Finds the last name of the level, that predicate returns More...
static string | FindLastLevelName (MadLevel.Type levelType)
| Finds the last name of the level of given More...
static string | GetPreviousLevelName ()
| Gets the name of the previous level. More...
static string | GetPreviousLevelName (MadLevel.Type type)
| Gets the name of the previous level of given type. More...
static string | GetPreviousLevelNameTo (string levelName)
| Gets the name of a level that exists before given level. More...
static string | GetPreviousLevelNameTo (string levelName, MadLevel.Type type)
| Gets the name of a level (with given type) that exists before given level. More...
static string | GetNextLevelName ()
| Gets the name of the next level. More...
static string | GetNextLevelName (MadLevel.Type type)
| Gets the name of the next level of given type. More...
static string | GetNextLevelNameTo (string levelName)
| Gets the name of a level that exists after given level. More...
static string | GetNextLevelNameTo (string levelName, MadLevel.Type type)
| Gets the name of a level (with given type) that exists after given level. More...

## Properties
static MadLevelConfiguration | activeConfiguration`[get]`
| Gets the active configuration. More...
static bool | hasActiveConfiguration`[get]`
| Gets a value indicating whether application has active configuration. More...
static string | arguments`[get, set]`
| Gets or sets this level arguments. More...
static string | currentLevelName`[get, set]`
| Gets the name of the current level. More...
static string | lastLevelName`[get, set]`
static string | lastPlayedLevelName`[get, set]`
| Gets or sets the name of the last visited level. More...

## Detailed Description

Level access & loading routines.

## Member Function Documentation

static string MadLevelManager.MadLevel.FindFirstCompletedLevelName | ( |  | ) |
| static

Finds the first completed level (in the order).

Returns
  The first completed level name or `null` if there's no level that is marked as completed.

static string MadLevelManager.MadLevel.FindFirstLevelName | ( | LevelPredicate | predicate | ) |
| static

Finds the first name of the level, that predicate returns

`true` value.

Returns
  The first found level or `null`if not found.``

Parameters

  predicate | ``The predicate.``

static string MadLevelManager.MadLevel.FindFirstLevelName | ( | MadLevel.Type | levelType | ) |
| static

Finds the first name of the level of given

`type`.

Returns
  The first found level or `null`if not found.``

Parameters

  levelType | ``The level type.``

static string MadLevelManager.MadLevel.FindFirstLockedLevelName | ( |  | ) |
| static

Finds the first locked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time.

Returns
  The first locked level name or `null` if there's no level that is marked as locked.

static string MadLevelManager.MadLevel.FindFirstUnlockedLevelName | ( |  | ) |
| static

Finds the first unlocked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time.

Returns
  The first locked level name or `null` if there's no level that is marked as locked.

static string MadLevelManager.MadLevel.FindLastCompletedLevelName | ( |  | ) |
| static

Finds the last completed level (in the order).

Returns
  The last completed level name or `null` if there's no level that is marked as completed.

static string MadLevelManager.MadLevel.FindLastLevelName | ( | LevelPredicate | predicate | ) |
| static

Finds the last name of the level, that predicate returns

`true` value.

Returns
  The last found level or `null`if not found.``

Parameters

  predicate | ``The predicate.``

static string MadLevelManager.MadLevel.FindLastLevelName | ( | MadLevel.Type | levelType | ) |
| static

Finds the last name of the level of given

`type`.

Returns
  The last found level or `null`if not found.``

Parameters

  levelType | ``The level type.``

static string MadLevelManager.MadLevel.FindLastLockedLevelName | ( |  | ) |
| static

Finds the last locked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time.

Returns
  The last locked level name or `null` if there's no level that is marked as locked.

static string MadLevelManager.MadLevel.FindLastUnlockedLevelName | ( |  | ) |
| static

Finds the last unlocked level (in the order). Be aware that locked flag in the new game is set when the player visits level select screen for the first time.

Returns
  The first locked level name or `null` if there's no level that is marked as locked.

static string [] MadLevelManager.MadLevel.GetAllLevelNames | ( |  | ) |
| static

Gets the all defined level names.

Returns
  The all defined level names.

static string [] MadLevelManager.MadLevel.GetAllLevelNames | ( | MadLevel.Type | type | ) |
| static

Gets the all defined level names of given type.

Returns
  The all defined level names of given type.

static string MadLevelManager.MadLevel.GetNextLevelName | ( |  | ) |
| static

Gets the name of the next level.

Returns
  The next level name or `null` if not found.

static string MadLevelManager.MadLevel.GetNextLevelName | ( | MadLevel.Type | type | ) |
| static

Gets the name of the next level of given type.

Returns
  The next level name or `null` if not found.

Parameters

  type | Level type.

static string MadLevelManager.MadLevel.GetNextLevelNameTo | ( | string | levelName | ) |
| static

Gets the name of a level that exists after given level.

Returns
  The name of next level or `null` if not found.

Parameters

  levelName | Level name.

static string MadLevelManager.MadLevel.GetNextLevelNameTo | ( | string | levelName,
|  | MadLevel.Type | type
| ) |  |
| static

Gets the name of a level (with given type) that exists after given level.

Returns
  The name of next level or `null` if not found.

Parameters

  levelName | Level name.
  type | Type of previous level.

static string MadLevelManager.MadLevel.GetPreviousLevelName | ( |  | ) |
| static

Gets the name of the previous level.

Returns
  The previous level name or `null`if not found.``

static string MadLevelManager.MadLevel.GetPreviousLevelName | ( | MadLevel.Type | type | ) |
| static

Gets the name of the previous level of given type.

Returns
  The previous level name or `null` if not found.

Parameters

  type | Level type.

static string MadLevelManager.MadLevel.GetPreviousLevelNameTo | ( | string | levelName | ) |
| static

Gets the name of a level that exists before given level.

Returns
  The name of previous level or `null` if not found.

Parameters

  levelName | Level name.

static string MadLevelManager.MadLevel.GetPreviousLevelNameTo | ( | string | levelName,
|  | MadLevel.Type | type
| ) |  |
| static

Gets the name of a level (with given type) that exists before given level.

Returns
  The name of previous level or `null` if not found.

Parameters

  levelName | Level name.
  type | Type of previous level.

static bool MadLevelManager.MadLevel.HasFirst | ( |  | ) |
| static

Tells if there is at least one level set in active level configuration.

Returns
  `true` if there is at least one level configured; otherwise, `false`.

static bool MadLevelManager.MadLevel.HasFirst | ( | Type | levelType | ) |
| static

Tells if there is at least one level of type

`levelType` set in active level configuration.

Parameters

  levelType | Level type to find.

Returns
  `true` if there is at least one level of given type configured; otherwise, `false`.

static bool MadLevelManager.MadLevel.HasNext | ( |  | ) |
| static

Determines whether there is next level present in level configuration (are there any other levels further ahead?)

Returns
  `true` if next level is available; otherwise, `false`.

static bool MadLevelManager.MadLevel.HasNext | ( | Type | levelType | ) |
| static

Determines whether there is next level present of the specified levelType in level configuration (are there any other levels further ahead?)

Returns
  `true` if next level is present; otherwise, `false`.

Parameters

  levelType | Type of next level to look after.

static bool MadLevelManager.MadLevel.HasPrevious | ( |  | ) |
| static

Determines whether there is previous level present in level configuration (are there any other levels before this one?)

Returns
  `true` if previous level is available; otherwise, `false`.

static bool MadLevelManager.MadLevel.HasPrevious | ( | Type | levelType | ) |
| static

Determines whether there is previous level present of the specified levelType in level configuration (are there any other levels further ahead?)

Returns
  `true` if previous level is present; otherwise, `false`.

Parameters

  levelType | Type of previous level to look after.

static void MadLevelManager.MadLevel.LoadFirst | ( |  | ) |
| static

Loads the first level set in level configuration.

static void MadLevelManager.MadLevel.LoadFirst | ( | Type | levelType | ) |
| static

Loads the first level of type

`levelType` set in level configuration.

Parameters

  levelType | Level type.

static AsyncOperation MadLevelManager.MadLevel.LoadFirstAsync | ( |  | ) |
| static

Loads the first level set in level configuration asynchronously in the background. This function requires Unity Pro.

Returns
  AsyncOperation object.

static AsyncOperation MadLevelManager.MadLevel.LoadFirstAsync | ( | Type | levelType | ) |
| static

Loads the first level of type

`levelType` set in level configuration asynchronously in the background. This function requires Unity Pro.

Parameters

  levelType | Level type.

Returns
  AsyncOperation object.

static void MadLevelManager.MadLevel.LoadLevelByName | ( | string | levelName | ) |
| static

Loads level by its name defined in level configuration.

Parameters

  levelName | Level name.

static AsyncOperation MadLevelManager.MadLevel.LoadLevelByNameAsync | ( | string | levelName | ) |
| static

Loads level by its name defined in level configuration asynchronously in the background. This function requires Unity Pro.

Parameters

  levelName | Level name.

Returns
  AsyncOperation object.

static void MadLevelManager.MadLevel.LoadNext | ( |  | ) |
| static

Loads next level defined in level configuration.

static void MadLevelManager.MadLevel.LoadNext | ( | Type | levelType | ) |
| static

Loads first level with type

`levelType` found after current level in level configuration.

Parameters

  levelType | Level type to load.

static AsyncOperation MadLevelManager.MadLevel.LoadNextAsync | ( |  | ) |
| static

Loads next level defined in level configuration asynchronously in the background. This function requires Unity Pro.

Returns
  AsyncOperation object.

static AsyncOperation MadLevelManager.MadLevel.LoadNextAsync | ( | Type | levelType | ) |
| static

Loads first level with type

`levelType` found after current level in level configuration asynchronously in the background. This function requires Unity Pro.

Parameters

  levelType | Level type to load.

Returns
  AsyncOperation object.

static void MadLevelManager.MadLevel.LoadPrevious | ( |  | ) |
| static

Loads previous level defined in level configuration.

static void MadLevelManager.MadLevel.LoadPrevious | ( | Type | levelType | ) |
| static

Loads first level with type

`levelType` found before current level in level configuration.

Parameters

  levelType | Level type to load.

static AsyncOperation MadLevelManager.MadLevel.LoadPreviousAsync | ( |  | ) |
| static

Loads previous level defined in level configuration asynchronously in the background. This function requires Unity Pro.

Returns
  AsyncOperation object.

static AsyncOperation MadLevelManager.MadLevel.LoadPreviousAsync | ( | Type | levelType | ) |
| static

Loads first level with type

`levelType` found before current level in level configuration asynchronously in the background. This function requires Unity Pro.

Parameters

  levelType | Level type to load.

Returns
  AsyncOperation object.

static void MadLevelManager.MadLevel.ReloadCurrent | ( |  | ) |
| static

Reloads current level.

static AsyncOperation MadLevelManager.MadLevel.ReloadCurrentAsync | ( |  | ) |
| static

Reloads the current level asynchronously in the background. This function requires Unity Pro.

Returns
  AsyncOperation object.

## Property Documentation

MadLevelConfiguration MadLevelManager.MadLevel.activeConfiguration
| static get

Gets the active configuration.

The active configuration.

string MadLevelManager.MadLevel.arguments
| static get set

Gets or sets this level arguments.

The arguments.

string MadLevelManager.MadLevel.currentLevelName
| static get set

Gets the name of the current level.

The name of the current level.

bool MadLevelManager.MadLevel.hasActiveConfiguration
| static get

Gets a value indicating whether application has active configuration.

`true` if has active configuration; otherwise, `false`.

string MadLevelManager.MadLevel.lastPlayedLevelName
| static get set

Gets or sets the name of the last visited level.

The name of the last visited level.

The documentation for this class was generated from the following file:

- Assets/Mad Level Manager/Scripts/Base/MadLevel.cs