teeworlds_network/lib/snapshot/items/game_data_flag.rb

25 lines
515 B
Ruby
Raw Normal View History

2022-11-19 10:24:13 +00:00
# frozen_string_literal: true
require_relative '../snap_item_base'
class NetObj
class GameDataFlag < SnapItemBase
attr_accessor :flag_carrier_red, :flag_carrier_blue,
:flag_drop_tick_red, :flag_drop_tick_blue
def initialize(hash_or_raw)
@field_names = %i[
flag_carrier_red
flag_carrier_blue
flag_drop_tick_red
flag_drop_tick_blue
]
super
end
def self.match_type?(type)
type == NETOBJTYPE_GAMEDATAFLAG
end
end
end