Module: Api::CloakState
- Defined in:
- lib/sc2ai/protocol/raw_pb.rb
Constant Summary collapse
- CLOAKED_UNKNOWN =
0
- CLOAKED =
1
- CLOAKED_DETECTED =
2
- NOT_CLOAKED =
3
- CLOAKED_ALLIED =
4
Class Method Summary collapse
Class Method Details
.lookup(val) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/sc2ai/protocol/raw_pb.rb', line 83 def self.lookup(val) if val == 0 :CLOAKED_UNKNOWN elsif val == 1 :CLOAKED elsif val == 2 :CLOAKED_DETECTED elsif val == 3 :NOT_CLOAKED elsif val == 4 :CLOAKED_ALLIED end end |
.resolve(val) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/sc2ai/protocol/raw_pb.rb', line 97 def self.resolve(val) if val == :CLOAKED_UNKNOWN 0 elsif val == :CLOAKED 1 elsif val == :CLOAKED_DETECTED 2 elsif val == :NOT_CLOAKED 3 elsif val == :CLOAKED_ALLIED 4 end end |