class Overlook::Csgo::Demo::Command

Attributes

slot[RW]
tick[RW]
type[RW]

Public Class Methods

from_io(reader) click to toggle source
# File lib/overlook/csgo/demo/command.rb, line 30
def self.from_io(reader)
  cmd         = reader.byte
  tick        = reader.signed_int32
  slot        = reader.byte

  new(cmd, tick, slot)
end
new(type, tick, slot) click to toggle source
# File lib/overlook/csgo/demo/command.rb, line 23
def initialize(type, tick, slot)
  @type = type
  @tick = tick
  @slot = slot
  @tick = 0 unless packet?
end

Public Instance Methods

packet?() click to toggle source
# File lib/overlook/csgo/demo/command.rb, line 65
def packet?
  type == :packet
end
skipable?() click to toggle source
# File lib/overlook/csgo/demo/command.rb, line 69
def skipable?
  type == :skipable
end
stop?() click to toggle source
# File lib/overlook/csgo/demo/command.rb, line 57
def stop?
  type == :stop
end
sync?() click to toggle source
# File lib/overlook/csgo/demo/command.rb, line 61
def sync?
  type == :sync
end
unknown?() click to toggle source
# File lib/overlook/csgo/demo/command.rb, line 53
def unknown?
  type == :unknown
end