Class: Avm::MaysMagicalSchool::Stage::Object

Inherits:
Object
  • Object
show all
Defined in:
lib/avm/mays_magical_school/stage/object.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_serialized_data(data) ⇒ Object



11
12
13
# File 'lib/avm/mays_magical_school/stage/object.rb', line 11

def from_serialized_data(data)
  new(data.fetch(:type), ::Cliutils.v2.new(*data.fetch(:coord)))
end

Instance Method Details

#to_serialized_dataObject



18
19
20
21
22
# File 'lib/avm/mays_magical_school/stage/object.rb', line 18

def to_serialized_data
  {
    type: type, coord: coord.values
  }
end