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

Returns a new instance of Rect.



111
112
113
# File 'lib/RGSS.rb', line 111

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

Class Method Details

._load(bytes) ⇒ Object



119
120
121
# File 'lib/RGSS.rb', line 119

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

Instance Method Details

#_dump(*ignored) ⇒ Object



115
116
117
# File 'lib/RGSS.rb', line 115

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