teeworlds_network/lib/snapshot/items/player_info.rb

24 lines
425 B
Ruby

# frozen_string_literal: true
require_relative '../snap_item_base'
class NetObj
class PlayerInfo < SnapItemBase
attr_accessor :player_flags, :score, :latency
def initialize(hash_or_raw)
@type = NETOBJTYPE_PLAYERINFO
@field_names = %i[
player_flags
score
latency
]
super
end
def self.match_type?(type)
type == NETOBJTYPE_PLAYERINFO
end
end
end