![]() |
Jumpvalley 0.5.0
An app and library that can be used to test and run 3D platformer levels. Currently being made with Godot.
|
This class represents a level that's playable in Jumpvalley.
Each level contains four primary components: interactives, music, static objects, and start point. More details can be found on Jumpvalley's wiki article on Level Layout.
More...
Public Types | |
enum | RunState { Stopped = 0 , Paused = 1 , Playing = 2 } |
Indicates the current run state of the level. More... | |
Public Member Functions | |
Level (LevelInfo info, Node root, TimeSpan lastElapsedTime, object runner=null) | |
Constructs an instance of Level to represent a level corresponding to its info file. | |
Player | GetCurrentPlayer () |
Gets the player instance that this level is running under. Returns the player instance if found, null otherwise. Player instance is obtained from this level's runner if it's of type LevelRunner. | |
virtual void | InitializeInteractive (Node nodeMarker) |
The level's method for initializing each of its Interactives. This method can be overriden to provide custom logic for initalizing an interactive (e.g. when a level has custom Interactive types). | |
void | SendPlayerToCurrentCheckpoint () |
Sends the player's character to the checkpoint they're currently on. | |
override void | Initialize () |
Level initialization method that initializes the level after the constructor runs, in case such method is needed. By default, this method is only called once after the object's constructor runs. Initialize() typically shouldn't be called more than once for the same Level instance. | |
override void | Start () |
The level's start method. This method is called every time the user starts or restarts the level, and it's a great place to put code that will be run after initialization, but just before the level starts. | |
override void | Stop () |
The level's stop method. This method is called right after the user stops or exits the level. | |
new void | Dispose () |
Disposes of this Level instance. This method is a great place to free up resources being used by the level instance, especially right before the level itself gets freed from memory. | |
![]() | |
Interactive (OffsetStopwatch clock, object runner=null) | |
Creates a new instance of Interactive that will run on the given OffsetStopwatch. | |
new void | Dispose () |
Disposes of this Interactive instance. This method is a great place to free up resources being used by the interactive instance, especially right before the interactive itself gets freed from memory. | |
Public Attributes | |
LevelPackage | Package = null |
The LevelPackage that this Level instance belongs to. | |
![]() | |
object | Runner |
The object that's running this interactive. | |
Properties | |
LevelInfo | Info [get] |
Information about the level that's specified in the level's info file. This includes things like level ID and full name. | |
Node | RootNode [get] |
The root node of the level. | |
Node | InteractivesNode [get] |
The node containing the level's interactives. | |
List< Interactive > | Interactives [get] |
The list of the level's interactives as instances of the Interactive class. | |
List< Interactive > | CheckpointInteractives [get] |
Interactives as instances of the Interactive class that are stored in CheckpointsNode | |
Node | Music [get] |
The node containing the level's music. | |
List< MusicZone > | MusicZones [get] |
The level's music zones. | |
MusicGroup | PrimaryPlaylist [get] |
The level's primary music playlist. | |
Node | StaticObjects [get] |
The node containing the level's static objects. | |
Node | CheckpointsNode [get] |
The node where the level's checkpoints should be stored. This can be used as a place to load interactives that should be loaded after interactives placed in InteractivesNode. | |
CheckpointSet | Checkpoints [get] |
The object that contains the code handling the level's checkpoints. | |
Node | Lighting [get] |
The node where the level's lighting is specified. | |
Godot.Environment | LevelEnvironment [get] |
The Godot.Environment specified by the level. | |
DirectionalLight3D | LevelDirectionalLight [get] |
The DirectionalLight3D specified by the level. | |
RunState | CurrentRunState [get] |
The level's current run state. | |
![]() | |
bool | IsInitialized [get, protected set] |
Whether or not Initialize has been called once already. | |
bool | IsRunning [get, protected set] |
Whether or not the interactive is running (e.g. after Start has been called). | |
OffsetStopwatch | Clock [get] |
The OffsetStopwatch that the Interactive will run on. This stopwatch can be used to synchronize the Interactive's various operations to whatever the current time on this stopwatch is. | |
This class represents a level that's playable in Jumpvalley.
Each level contains four primary components: interactives, music, static objects, and start point. More details can be found on Jumpvalley's wiki article on Level Layout
.
|
inline |
Constructs an instance of Level to represent a level corresponding to its info file.
info | Info about the level |
root | The root node of the level to represent |
lastElapsedTime | The most recent amount of elapsed running time that the level left off of |
runner | The object that's running this level. Typically, this should be a LevelRunner. |
|
inlinevirtual |
Level initialization method that initializes the level after the constructor runs, in case such method is needed.
By default, this method is only called once after the object's constructor runs. Initialize() typically shouldn't be called more than once for the same Level instance.
Reimplemented from Jumpvalley.Levels.Interactives.Interactive.
|
inlinevirtual |
The level's method for initializing each of its Interactives.
This method can be overriden to provide custom logic for initalizing an interactive (e.g. when a level has custom Interactive types).
nodeMarker | The interactive's node marker |
|
inlinevirtual |
The level's start method. This method is called every time the user starts or restarts the level, and it's a great place to put code that will be run after initialization, but just before the level starts.
Reimplemented from Jumpvalley.Levels.Interactives.Interactive.
|
inlinevirtual |
The level's stop method. This method is called right after the user stops or exits the level.
Reimplemented from Jumpvalley.Levels.Interactives.Interactive.