示例#1
0
 public override void OnDisabled()
 {
     PlayerEvents.InteractingDoor   -= _eventHandlers.OnInteractingDoor;
     ServerEvents.WaitingForPlayers -= _eventHandlers.OnWaitingForPlayers;
     _eventHandlers = null;
     Translations   = null;
     Singleton      = null;
     base.OnDisabled();
 }
示例#2
0
        public override void OnEnabled()
        {
            Singleton      = this;
            _eventHandlers = new EventHandlers();
            PlayerEvents.InteractingDoor   += _eventHandlers.OnInteractingDoor;
            ServerEvents.WaitingForPlayers += _eventHandlers.OnWaitingForPlayers;
            Translations = new Translations();
            if (!Manager.RegisterUltimate(new LockdownCommand()))
            {
                OnDisabled();
            }

            base.OnEnabled();
        }