Class: SDC::Music

Inherits:
Object
  • Object
show all
Defined in:
engine_docs/automatic_doc_Music.rb,
engine_docs/automatic_doc_Music.rb

Overview

Music track class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMusic

Creates a music track (without content)



# File 'engine_docs/automatic_doc_Music.rb', line 9

Instance Attribute Details

#loopingBoolean

Looping property of the music track

Returns:

  • (Boolean)


# File 'engine_docs/automatic_doc_Music.rb', line 29

#pitchFloat

Pitch of the music track, with default 1.0

Returns:

  • (Float)


# File 'engine_docs/automatic_doc_Music.rb', line 33

#volumeFloat

Volume of the music track, ranging from 0 to 100 (default)

Returns:

  • (Float)


# File 'engine_docs/automatic_doc_Music.rb', line 37

Instance Method Details

#open_from_file(filename) ⇒ Boolean

Loads the music track from file, returning true if loading was successful, else false.

Parameters:

  • filename (String)

Returns:

  • (Boolean)


# File 'engine_docs/automatic_doc_Music.rb', line 41

#pausenil

Pauses the music track if running

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Music.rb', line 24

#playnil

Plays the music track from the beginning or resumes it if paused

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Music.rb', line 14

#stopnil

Stops the music track if running

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Music.rb', line 19