This class represents a level package, a filesystem folder that contains the components of a level.
Each level package includes:
-
The level's info file
-
The Godot package (PCK file) that contains the level's contents
More...
|
| 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.
|
|
|
LevelRunner | Runner |
| The level runner that's running this level package.
|
|
|
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.
|
|
This class represents a level package, a filesystem folder that contains the components of a level.
Each level package includes:
-
The level's info file
-
The Godot package (PCK file) that contains the level's contents
◆ LevelPackage()
Jumpvalley.Levels.LevelPackage.LevelPackage |
( |
string | path, |
|
|
LevelRunner | runner ) |
|
inline |
Constructs a LevelPackage object for a given level package's directory.
- Parameters
-
path | The directory path of the level package |
runner | The level runner that's running this level package |
◆ DisposeRootNode()
void Jumpvalley.Levels.LevelPackage.DisposeRootNode |
( |
| ) |
|
|
inline |
Unloads and disposes of the level's root node.
- Exceptions
-
InvalidOperationException | Thrown 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: