Module: Api::DebugSetUnitValue::UnitValue

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

Constant Summary collapse

ENUM_UNIT_VALUE_UNSET =
0
ENERGY =
1
LIFE =
2
SHIELDS =
3

Class Method Summary collapse

Class Method Details

.lookup(val) ⇒ Object



9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
# File 'lib/sc2ai/protocol/debug_pb.rb', line 9806

def self.lookup(val)
  if val == 0
    :ENUM_UNIT_VALUE_UNSET
  elsif val == 1
    :ENERGY
  elsif val == 2
    :LIFE
  elsif val == 3
    :SHIELDS
  end
end

.resolve(val) ⇒ Object



9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
# File 'lib/sc2ai/protocol/debug_pb.rb', line 9818

def self.resolve(val)
  if val == :ENUM_UNIT_VALUE_UNSET
    0
  elsif val == :ENERGY
    1
  elsif val == :LIFE
    2
  elsif val == :SHIELDS
    3
  end
end