예제 #1
0
    private void ForceInterrupt(SpeechLines lines)
    {
        this.InterruptionAllowed = true;
        this.InterruptionTimer.Stop();

        this.Say(lines);
    }
예제 #2
0
    public void Say(SpeechLines lines)
    {
        if (lines.Interruption)
        {
            this.Interrupt();
        }

        foreach (SpeechLine line in lines.Lines)
        {
            this.Messages.Enqueue(line);
        }

        this.WaitingTime = lines.WaitBetween;
        this.WaitTimer.Start(lines.WaitBefore);
    }
예제 #3
0
    private void Say(SpeechLines lines)
    {
        if (this.Speaking && !(lines.Interruption && this.CanInterrupt()))
        {
            // if they're already speaking and this is not an allowed interruption
            return;
        }

        if (this.Speaking && lines.Interruption)
        {
            // if this is an interruption
            ForbidNextInterruptions();
        }

        this.Speaking = true;
        this.BlankTimer.Stop();

        this.EmitSignal(nameof(Transmitted), lines);
    }
예제 #4
0
 private void OnSportscasterTransmitted(SpeechLines lines)
 {
     this.Say(lines);
 }