Jumpvalley 0.5.0
An app and library that can be used to test and run 3D platformer levels. Currently being made with Godot.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
Jumpvalley.Levels.LevelPackage Class Reference

This class represents a level package, a filesystem folder that contains the components of a level.
Each level package includes:

More...

Inheritance diagram for Jumpvalley.Levels.LevelPackage:

Public Member Functions

 LevelPackage (string path, LevelRunner runner)
 Constructs a LevelPackage object for a given level package's directory.
 
bool LoadRootNode ()
 Attempts to load the level's main scene. If this operation is successful, RootNode will be set to the scene's root node, and this method will return true. Otherwise, this method will return false.
 
void DisposeRootNode ()
 Unloads and disposes of the level's root node.
 
void CreateLevelInstance ()
 Creates a level instance for the current RootNode and assigns it to LevelInstance
 
void DisposeLevelInstance ()
 Disposes of LevelInstance if it's not null.
 
void StartLevel ()
 Initializes the level assigned to LevelInstance (if that hasn't been done yet), and then starts it.
 
void StopLevel ()
 Stops the level assigned to LevelInstance
 
void Dispose ()
 Disposes of this level package, including the level instance associated with it.
 

Public Attributes

LevelRunner Runner
 The level runner that's running this level package.
 

Properties

LevelInfo Info [get]
 The level's info file.
 
string Path [get]
 The directory path of the level package.
 
Node RootNode [get]
 If the level's root node has been loaded, this will point to it.
 
Level LevelInstance [get]
 The level instance associated with this level.
 

Detailed Description

This class represents a level package, a filesystem folder that contains the components of a level.
Each level package includes:

Constructor & Destructor Documentation

◆ LevelPackage()

Jumpvalley.Levels.LevelPackage.LevelPackage ( string path,
LevelRunner runner )
inline

Constructs a LevelPackage object for a given level package's directory.

Parameters
pathThe directory path of the level package
runnerThe level runner that's running this level package

Member Function Documentation

◆ DisposeRootNode()

void Jumpvalley.Levels.LevelPackage.DisposeRootNode ( )
inline

Unloads and disposes of the level's root node.

Exceptions
InvalidOperationExceptionThrown when LevelInstance isn't null. This is to prevent errors that can occur when the root node is disposed while the level is still active.

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