Пример #1
0
        internal void InvokePlayerSpeakEvent(DissonanceUserSetup userSetup, ref bool intercom, ref bool radio,
                                             ref bool scp939, ref bool scpChat, ref bool specChat, ref bool allow)
        {
            var ev = new PlayerSpeakEventArgs
            {
                Allow      = allow, Player = userSetup.GetPlayer(), IntercomTalk = intercom, RadioTalk = radio,
                Scp939Talk = scp939, ScpChat = scpChat, SpectatorChat = specChat, DissonanceUserSetup = userSetup
            };

            PlayerSpeakEvent?.Invoke(ev);

            intercom = ev.IntercomTalk;
            radio    = ev.RadioTalk;
            scp939   = ev.Scp939Talk;
            scpChat  = ev.ScpChat;
            specChat = ev.SpectatorChat;
            allow    = ev.Allow;
        }