Class: Ruby2D::Music

Inherits:
Object
  • Object
show all
Defined in:
lib/or2d/patches/music.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#playingObject (readonly)

Returns the value of attribute playing.



4
5
6
# File 'lib/or2d/patches/music.rb', line 4

def playing
  @playing
end

Instance Method Details

#pauseObject



15
16
17
18
# File 'lib/or2d/patches/music.rb', line 15

def pause
  @playing = false
  ext_pause
end

#playObject



10
11
12
13
# File 'lib/or2d/patches/music.rb', line 10

def play
  @playing ||= true
  ext_play
end

#playing?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/or2d/patches/music.rb', line 6

def playing?
  @playing
end

#resumeObject



20
21
22
23
# File 'lib/or2d/patches/music.rb', line 20

def resume
  @playing = true
  ext_resume
end

#stopObject



25
26
27
28
# File 'lib/or2d/patches/music.rb', line 25

def stop
  @playing = false
  ext_stop
end