Class: NetObj::GameDataFlag

Inherits:
SnapItemBase show all
Defined in:
lib/snapshot/items/game_data_flag.rb

Instance Attribute Summary collapse

Attributes inherited from SnapItemBase

#id, #name, #notes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SnapItemBase

#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate

Constructor Details

#initialize(hash_or_raw) ⇒ GameDataFlag

Returns a new instance of GameDataFlag.



10
11
12
13
14
15
16
17
18
# File 'lib/snapshot/items/game_data_flag.rb', line 10

def initialize(hash_or_raw)
  @field_names = %i[
    flag_carrier_red
    flag_carrier_blue
    flag_drop_tick_red
    flag_drop_tick_blue
  ]
  super
end

Instance Attribute Details

#flag_carrier_blueObject

Returns the value of attribute flag_carrier_blue.



7
8
9
# File 'lib/snapshot/items/game_data_flag.rb', line 7

def flag_carrier_blue
  @flag_carrier_blue
end

#flag_carrier_redObject

Returns the value of attribute flag_carrier_red.



7
8
9
# File 'lib/snapshot/items/game_data_flag.rb', line 7

def flag_carrier_red
  @flag_carrier_red
end

#flag_drop_tick_blueObject

Returns the value of attribute flag_drop_tick_blue.



7
8
9
# File 'lib/snapshot/items/game_data_flag.rb', line 7

def flag_drop_tick_blue
  @flag_drop_tick_blue
end

#flag_drop_tick_redObject

Returns the value of attribute flag_drop_tick_red.



7
8
9
# File 'lib/snapshot/items/game_data_flag.rb', line 7

def flag_drop_tick_red
  @flag_drop_tick_red
end

Class Method Details

.match_type?(type) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/snapshot/items/game_data_flag.rb', line 20

def self.match_type?(type)
  type == NETOBJTYPE_GAMEDATAFLAG
end