ILevelManager

interface ILevelManager

The LevelManager interface.

void Load(System.Object context, Protogame.LevelAsset levelAssel)

Loads a level entity into the game hierarchy, with the specified context as the place to load entities. Normally you’ll pass in the game world here, but you don’t have to. For example, if you wanted to load the level into an entity group, you would pass the entity group as the context instead.

Parameters:
  • context (System.Object) – Usually the current game world, but can be any object in the hierarchy.
  • levelAssel (Protogame.LevelAsset) –
void Load(System.Object context, Protogame.LevelAsset levelAsset, System.Func<IPlan, Object, Boolean> filter)

Loads a level entity into the game hierarchy, with the specified context as the place to load entities. Normally you’ll pass in the game world here, but you don’t have to. For example, if you wanted to load the level into an entity group, you would pass the entity group as the context instead.

Parameters:
  • context (System.Object) – Usually the current game world, but can be any object in the hierarchy.
  • levelAsset (Protogame.LevelAsset) – The level to load.
  • Object, Boolean> filter (System.Func<IPlan,) – An optional filter which can be used to exclude parts of the level during load.
System.Threading.Tasks.Task LoadAsync(System.Object context, Protogame.LevelAsset levelAssel)

Asynchronously loads a level entity into the game hierarchy, with the specified context as the place to load entities. Normally you’ll pass in the game world here, but you don’t have to. For example, if you wanted to load the level into an entity group, you would pass the entity group as the context instead.

Parameters:
  • context (System.Object) – Usually the current game world, but can be any object in the hierarchy.
  • levelAssel (Protogame.LevelAsset) –
System.Threading.Tasks.Task LoadAsync(System.Object context, Protogame.LevelAsset levelAsset, System.Func<IPlan, Object, Boolean> filter)

Asynchronously loads a level entity into the game hierarchy, with the specified context as the place to load entities. Normally you’ll pass in the game world here, but you don’t have to. For example, if you wanted to load the level into an entity group, you would pass the entity group as the context instead.

Parameters:
  • context (System.Object) – Usually the current game world, but can be any object in the hierarchy.
  • levelAsset (Protogame.LevelAsset) – The level to load.
  • Object, Boolean> filter (System.Func<IPlan,) – An optional filter which can be used to exclude parts of the level during load.