Method: Api::ActionSpatialUnitSelectionPoint#as_json

Defined in:
lib/sc2ai/protocol/spatial_pb.rb

#as_json(options = {}) ⇒ Object



12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
# File 'lib/sc2ai/protocol/spatial_pb.rb', line 12142

def as_json(options = {})
  result = {}

  result["selectionScreenCoord"] = (
    if @selection_screen_coord.nil?
      {}
    else
      @selection_screen_coord.as_json(options)
    end
  ) if !options[:compact] || has_selection_screen_coord?
  result["type"] = @type if !options[:compact] || has_type?

  result
end