2022-11-18 08:25:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-11-19 09:09:45 +00:00
|
|
|
require_relative '../snap_item_base'
|
2022-11-18 08:25:08 +00:00
|
|
|
|
|
|
|
class NetObj
|
2022-11-19 09:09:45 +00:00
|
|
|
class GameData < SnapItemBase
|
2022-11-18 08:25:08 +00:00
|
|
|
attr_accessor :game_start_tick, :game_state_flags, :game_state_end_tick
|
|
|
|
|
|
|
|
def initialize(hash_or_raw)
|
2024-02-21 06:44:49 +00:00
|
|
|
@type = NETOBJTYPE_GAMEDATA
|
2022-11-18 08:57:43 +00:00
|
|
|
@field_names = %i[
|
|
|
|
game_start_tick
|
|
|
|
game_state_flags
|
|
|
|
game_state_end_tick
|
|
|
|
]
|
2022-11-19 09:09:45 +00:00
|
|
|
super
|
2022-11-18 08:25:08 +00:00
|
|
|
end
|
|
|
|
|
2022-11-18 09:34:47 +00:00
|
|
|
def self.match_type?(type)
|
2022-11-18 08:25:08 +00:00
|
|
|
type == NETOBJTYPE_GAMEDATA
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|