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 | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Jumpvalley.Music.MusicZone Class Reference

Represents a single music zone.
Music zones each have their own playlist. Such playlists typically only contain one song, but it's possible for the playlists to have multiple songs.
To specify the geometry that makes up the music zone, the music zone has to have a node named "ZoneParts" as a direct child. This "ZoneParts" node should contain MeshInstance3Ds using box meshes (preferred for performance reasons) or CSGBox3Ds. These boxes make up the music zone's geometry. More...

Inheritance diagram for Jumpvalley.Music.MusicZone:
Jumpvalley.Music.MusicGroup Jumpvalley.Music.Playlist

Public Member Functions

 MusicZone (Node node)
 
bool IsPointInZone (Vector3 point)
 Based on the size, rotation, and position of each box that makes up the music zone, this method returns whether or not the given point is within the music zone.
 
- Public Member Functions inherited from Jumpvalley.Music.MusicGroup
 MusicGroup (Node node)
 Creates an instance of MusicGroup to represent a specified node.
 
new void Dispose ()
 Disposes of this MusicGroup, including all of the Song instances associated with it.
 
- Public Member Functions inherited from Jumpvalley.Music.Playlist
void Add (Song s)
 Adds a song to the playlist.
 
void Remove (Song s)
 Removes a song from the playlist.

If the song that gets removed is being played, the playlist will move onto the next song if there are still songs in the playlist after removal, or the playlist will stop immediately.
 
void Play ()
 This method plays the first song in the playlist (the song in index 0) if no song in the playlist is currently being played. Otherwise, the playback of the current song is resumed and the linear volume of this playlist transitions back to (LinearVolume * LocalVolumeScale).
 
void StopImmediately ()
 Stops the playback of the playlist immediately, skipping the fade out transition that gradually makes the playlist inaudible.
 
void Stop ()
 This method gradually transitions the playlist's volume to be inaudible, and then stops the playlist once that transition is done.
 
new void Dispose ()
 Stops and disposes of this Playlist.
 

Static Public Member Functions

static bool IsLocalSpacePointInBox (Vector3 localPoint, Vector3 boxSize)
 Returns whether or not the given point localPoint is within the given box's size boxSize .
 
- Static Public Member Functions inherited from Jumpvalley.Music.Playlist
static float VolPercentToDecibels (float percent)
 Converts a volume percentage in the range of [0, 1] to the corresponding value in decibels and returns the result.
 

Public Attributes

List< MeshInstance3D > MeshBoxes = new List<MeshInstance3D>()
 The MeshInstance3D boxes that make up the geometry of the music zone.
 
List< CsgBox3D > CsgBoxes = new List<CsgBox3D>()
 The CsgBox3Ds that make up the geometry of the music zone.
 
- Public Attributes inherited from Jumpvalley.Music.Playlist
double TransitionTime = 0
 The number of seconds that the volume transitioning lasts when uninterrupted.
 
SongStreamHandlingModeFlags SongStreamHandlingMode
 How the playlist is currently opening and closing audio streams of its songs.
 

Static Public Attributes

static readonly string MUSIC_ZONE_GEOMETRY_CONTAINER_NAME = "ZoneParts"
 The name of the Node that contains the 3D boxes that make up the geometry of the music zone. Such boxes should be direct children of the node, and they can either be MeshInstance3Ds (preferred for performance reasons) or CSGBox3Ds.
 
- Static Public Attributes inherited from Jumpvalley.Music.MusicGroup
static readonly string SONG_METADATA_ENTRY_PREFIX = "song"
 The prefix of the song metadata entry name within MusicListNode
 
static readonly string SONGS_META_NAME = "songs"
 Name of the metadata entry storing the songs array.
 
static readonly string MUSIC_LIST_NODE_NAME = "Music"
 The name of the node that contains the list of songs as metadata.
 

Additional Inherited Members

- Public Types inherited from Jumpvalley.Music.Playlist
enum  SongStreamHandlingModeFlags { Disabled = 0 , AddAndRemove = 1 }
 Enumerator that specifies how a Playlist should approach opening and closing the audio streams of its Song instances. More...
 
- Protected Member Functions inherited from Jumpvalley.Music.Playlist
void HandleTweenFinish (object _o, EventArgs _e)
 
void OnSongChanged (SongChangedArgs args)
 
void RaiseStoppedEvent ()
 
- Protected Attributes inherited from Jumpvalley.Music.Playlist
List< SongSongList = new List<Song>()
 The list of Songs being played by this playlist.
 
- Properties inherited from Jumpvalley.Music.MusicGroup
Node ActualNode [get]
 The actual node that the MusicGroup is handling.
 
Node MusicListNode [get]
 The node that uses node metadata to list the directory paths of song packages.
 
List< SongPackageSongPackages = new List<SongPackage>() [get]
 The song packages being played by this MusicGroup
 
- Properties inherited from Jumpvalley.Music.Playlist
static float NonAudibleVolume = Mathf.DbToLinear(-80f) [get]
 Lowest audio volume (in the linear form) that Godot's editor will let you set the volume of a sound to.
Such volume shouldn't be audible to humans.
 
double LocalVolumeScale [get, set]
 Multiplier for linear volume that's typically in the range of [0, 1]
Can be used to mute or unmute the playlist without affecting the original value of LinearVolume
 
double LinearVolume [get, set]
 Volume of the playlist's music in a linear fashion.
 
Song CurrentSong [get]
 The song that's currently being played in this playlist.
 
- Events inherited from Jumpvalley.Music.Playlist
EventHandler< SongChangedArgsSongChanged
 Called when the currently playing song changes.
 
EventHandler Stopped
 Called when the playlist stops the playback of its music. If a fade transition is applied to fade out the currently playing song, this event will get called after the transition has completed.
 

Detailed Description

Represents a single music zone.
Music zones each have their own playlist. Such playlists typically only contain one song, but it's possible for the playlists to have multiple songs.
To specify the geometry that makes up the music zone, the music zone has to have a node named "ZoneParts" as a direct child. This "ZoneParts" node should contain MeshInstance3Ds using box meshes (preferred for performance reasons) or CSGBox3Ds. These boxes make up the music zone's geometry.

Member Function Documentation

◆ IsLocalSpacePointInBox()

static bool Jumpvalley.Music.MusicZone.IsLocalSpacePointInBox ( Vector3 localPoint,
Vector3 boxSize )
inlinestatic

Returns whether or not the given point localPoint is within the given box's size boxSize .

Returns
Whether or not the given point localPoint is within the given box's size boxSize .

◆ IsPointInZone()

bool Jumpvalley.Music.MusicZone.IsPointInZone ( Vector3 point)
inline

Based on the size, rotation, and position of each box that makes up the music zone, this method returns whether or not the given point is within the music zone.

Parameters
pointThe point (in global space coordinates)
Returns
Whether or not the point is in the music zone

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