Class: Tone

Inherits:
Object
  • Object
show all
Defined in:
lib/RGSS.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bytes) ⇒ Tone

Returns a new instance of Tone.



97
98
99
# File 'lib/RGSS.rb', line 97

def initialize(bytes)
  @r, @g, @b, @a = *bytes.unpack('D4')
end

Class Method Details

._load(bytes) ⇒ Object



105
106
107
# File 'lib/RGSS.rb', line 105

def self._load(bytes)
  Tone.new(bytes)
end

Instance Method Details

#_dump(*ignored) ⇒ Object



101
102
103
# File 'lib/RGSS.rb', line 101

def _dump(*ignored)
  return [@r, @g, @b, @a].pack('D4')
end