Ejemplo n.º 1
0
        /// <summary>
        /// Registers the plugin events.
        /// </summary>
        private void RegisterEvents()
        {
            server  = new Handlers.Server();
            player  = new Handlers.Player();
            warhead = new Handlers.Warhead();
            map     = new Handlers.Map();
            item    = new Handlers.Item();

            Events.Handlers.Server.WaitingForPlayers += server.OnWaitingForPlayers;
            Events.Handlers.Server.EndingRound       += server.OnEndingRound;

            Events.Handlers.Player.Died         += player.OnDied;
            Events.Handlers.Player.ChangingRole += player.OnChangingRole;
            Events.Handlers.Player.ChangingItem += player.OnChangingItem;
            Events.Handlers.Player.Verified     += player.OnVerified;
            Events.Handlers.Player.FailingEscapePocketDimension += player.OnFailingEscapePocketDimension;
            Events.Handlers.Player.EscapingPocketDimension      += player.OnEscapingPocketDimension;
            Events.Handlers.Player.UnlockingGenerator           += player.OnUnlockingGenerator;

            Events.Handlers.Warhead.Stopping += warhead.OnStopping;
            Events.Handlers.Warhead.Starting += warhead.OnStarting;

            Events.Handlers.Scp106.Teleporting    += player.OnTeleporting;
            Events.Handlers.Scp106.Containing     += player.OnContaining;
            Events.Handlers.Scp106.CreatingPortal += player.OnCreatingPortal;

            Events.Handlers.Scp914.Activating          += player.OnActivating;
            Events.Handlers.Scp914.ChangingKnobSetting += player.OnChangingKnobSetting;

            Events.Handlers.Map.ExplodingGrenade += map.OnExplodingGrenade;

            Events.Handlers.Item.ChangingDurability  += item.OnChangingDurability;
            Events.Handlers.Item.ChangingAttachments += item.OnChangingAttachments;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Unregisters the plugin events.
        /// </summary>
        private void UnregisterEvents()
        {
            Events.Handlers.Server.WaitingForPlayers -= server.OnWaitingForPlayers;
            Events.Handlers.Server.EndingRound       -= server.OnEndingRound;

            Events.Handlers.Player.Died         -= player.OnDied;
            Events.Handlers.Player.ChangingRole -= player.OnChangingRole;
            Events.Handlers.Player.ChangingItem -= player.OnChangingItem;
            Events.Handlers.Player.Verified     -= player.OnVerified;
            Events.Handlers.Player.FailingEscapePocketDimension -= player.OnFailingEscapePocketDimension;
            Events.Handlers.Player.EscapingPocketDimension      -= player.OnEscapingPocketDimension;
            Events.Handlers.Player.UnlockingGenerator           -= player.OnUnlockingGenerator;

            Events.Handlers.Warhead.Stopping -= warhead.OnStopping;
            Events.Handlers.Warhead.Starting -= warhead.OnStarting;

            Events.Handlers.Scp106.Teleporting    -= player.OnTeleporting;
            Events.Handlers.Scp106.Containing     -= player.OnContaining;
            Events.Handlers.Scp106.CreatingPortal -= player.OnCreatingPortal;

            Events.Handlers.Scp914.Activating          -= player.OnActivating;
            Events.Handlers.Scp914.ChangingKnobSetting -= player.OnChangingKnobSetting;

            Events.Handlers.Map.ExplodingGrenade -= map.OnExplodingGrenade;

            Events.Handlers.Item.ChangingDurability  -= item.OnChangingDurability;
            Events.Handlers.Item.ChangingAttachments -= item.OnChangingAttachments;

            server  = null;
            player  = null;
            warhead = null;
            map     = null;
            item    = null;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Unregisters the plugin events.
        /// </summary>
        private void UnregisterEvents()
        {
            Events.Handlers.Server.WaitingForPlayers -= server.OnWaitingForPlayers;
            Events.Handlers.Server.EndingRound       -= server.OnEndingRound;

            Events.Handlers.Player.Died         -= player.OnDied;
            Events.Handlers.Player.ChangingRole -= player.OnChangingRole;
            Events.Handlers.Player.ChangingItem -= player.OnChangingItem;
            Events.Handlers.Player.Joined       -= player.OnJoined;

            Events.Handlers.Warhead.Stopping -= warhead.OnStopping;
            Events.Handlers.Warhead.Starting -= warhead.OnStarting;

            Events.Handlers.Scp106.Teleporting    -= player.OnTeleporting;
            Events.Handlers.Scp106.Containing     -= player.OnContaining;
            Events.Handlers.Scp106.CreatingPortal -= player.OnCreatingPortal;

            Events.Handlers.Scp914.Activating          -= player.OnActivating;
            Events.Handlers.Scp914.ChangingKnobSetting -= player.OnChangingKnobSetting;

            server  = null;
            player  = null;
            warhead = null;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Registers the plugin events.
        /// </summary>
        private void RegisterEvents()
        {
            server  = new Handlers.Server();
            player  = new Handlers.Player();
            warhead = new Handlers.Warhead();

            Events.Handlers.Server.WaitingForPlayers += server.OnWaitingForPlayers;
            Events.Handlers.Server.EndingRound       += server.OnEndingRound;

            Events.Handlers.Player.Died         += player.OnDied;
            Events.Handlers.Player.ChangingRole += player.OnChangingRole;
            Events.Handlers.Player.ChangingItem += player.OnChangingItem;
            Events.Handlers.Player.Joined       += player.OnJoined;

            Events.Handlers.Warhead.Stopping += warhead.OnStopping;
            Events.Handlers.Warhead.Starting += warhead.OnStarting;

            Events.Handlers.Scp106.Teleporting    += player.OnTeleporting;
            Events.Handlers.Scp106.Containing     += player.OnContaining;
            Events.Handlers.Scp106.CreatingPortal += player.OnCreatingPortal;

            Events.Handlers.Scp914.Activating          += player.OnActivating;
            Events.Handlers.Scp914.ChangingKnobSetting += player.OnChangingKnobSetting;
        }