예제 #1
0
        public void UnregisterEvents()
        {
            Player.Joined -= player.OnJoin;
            Player.Left   -= player.OnLeft;
            Player.Died   -= player.OnScpcontain;
            MapEvents.AnnouncingNtfEntrance     -= player.OnMtfAnnounc;
            MapEvents.GeneratorActivated        -= player.OnGenOn;
            MapEvents.AnnouncingDecontamination -= player.OnAnnouncingDecont;
            MapEvents.Decontaminating           -= player.OnDeont;
            Server.RoundStarted -= server.OnRoundstart;
            Server.RoundEnded   -= server.OnRoundEnd;
            Warhead.Starting    -= warhead.OnAlphaStart;
            Warhead.Stopping    -= warhead.OnAlphaCancel;

            player  = null;
            server  = null;
            warhead = null;
        }
예제 #2
0
        public void RegisterEvents()
        {
            player  = new Handlers.PlayerEvents();
            server  = new Handlers.ServerEvents();
            warhead = new Handlers.WarheadEvents();

            Player.Joined += player.OnJoin;
            Player.Left   += player.OnLeft;
            Player.Died   += player.OnScpcontain;
            MapEvents.AnnouncingNtfEntrance     += player.OnMtfAnnounc;
            MapEvents.GeneratorActivated        += player.OnGenOn;
            MapEvents.AnnouncingDecontamination += player.OnAnnouncingDecont;
            MapEvents.Decontaminating           += player.OnDeont;
            Server.RoundStarted += server.OnRoundstart;
            Server.RoundEnded   += server.OnRoundEnd;
            Warhead.Starting    += warhead.OnAlphaStart;
            Warhead.Stopping    += warhead.OnAlphaCancel;
        }