class LZRTag::Hook::TeamSelector

Public Class Methods

new(handler, possibleTeams: [1, 2, 3, 4]) click to toggle source
Calls superclass method LZRTag::Hook::Base::new
# File lib/lzrtag/hooks/standard_hooks.rb, line 34
def initialize(handler, possibleTeams: [1, 2, 3, 4])
        super(handler, "Team Selector");

        @possibleTeams = possibleTeams;
end

Public Instance Methods

in_phase() click to toggle source
# File lib/lzrtag/hooks/standard_hooks.rb, line 40
def in_phase
        return @handler.gamePhase == :teamSelect;
end
is_selecting(pl) click to toggle source
# File lib/lzrtag/hooks/standard_hooks.rb, line 43
def is_selecting(pl)
        return ([:idle, :teamSelect].include? pl.brightness)
end