Class: Rect

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bytes) ⇒ Rect



113
114
115
# File 'lib/RGSS.rb', line 113

def initialize(bytes)
    @x, @y, @width, @height = *bytes.unpack('i4')
end

Class Method Details

._load(bytes) ⇒ Object



121
122
123
# File 'lib/RGSS.rb', line 121

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

Instance Method Details

#_dump(*ignored) ⇒ Object



117
118
119
# File 'lib/RGSS.rb', line 117

def _dump(*ignored)
    return [@x, @y, @width, @height].pack('i4')
end