Module: Api::Weapon::TargetType

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

Constant Summary collapse

ENUM_TARGET_TYPE_UNSET =
0
GROUND =
1
AIR =
2
ANY =
3

Class Method Summary collapse

Class Method Details

.lookup(val) ⇒ Object



2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
# File 'lib/sc2ai/protocol/data_pb.rb', line 2665

def self.lookup(val)
  if val == 0
    :ENUM_TARGET_TYPE_UNSET
  elsif val == 1
    :GROUND
  elsif val == 2
    :AIR
  elsif val == 3
    :ANY
  end
end

.resolve(val) ⇒ Object



2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
# File 'lib/sc2ai/protocol/data_pb.rb', line 2677

def self.resolve(val)
  if val == :ENUM_TARGET_TYPE_UNSET
    0
  elsif val == :GROUND
    1
  elsif val == :AIR
    2
  elsif val == :ANY
    3
  end
end