Class: Color

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bytes) ⇒ Color

Returns a new instance of Color.



85
86
87
# File 'lib/RGSS.rb', line 85

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

Class Method Details

._load(bytes) ⇒ Object



93
94
95
# File 'lib/RGSS.rb', line 93

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

Instance Method Details

#_dump(*ignored) ⇒ Object



89
90
91
# File 'lib/RGSS.rb', line 89

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