teeworlds_network/lib/snapshot/items/projectile.rb

27 lines
465 B
Ruby
Raw Normal View History

2022-11-19 09:25:31 +00:00
# frozen_string_literal: true
require_relative '../snap_item_base'
class NetObj
class Projectile < SnapItemBase
attr_accessor :x, :y, :vel_x, :vel_y, :type, :start_tick
def initialize(hash_or_raw)
2024-02-21 06:44:49 +00:00
@type = NETOBJTYPE_PROJECTILE
2022-11-19 09:25:31 +00:00
@field_names = %i[
x
y
vel_x
vel_y
type
start_tick
]
super
end
def self.match_type?(type)
type == NETOBJTYPE_PROJECTILE
end
end
end