Exemplo n.º 1
0
        protected virtual bool OnDoorUse(DoorUseEventArgs e)
        {
            Contract.Requires <ArgumentNullException>(e != null);

            try {
                if (this.DoorUse != null)
                {
                    this.DoorUse(this, e);
                }
            } catch (Exception ex) {
                this.ReportEventHandlerException("DoorUse", ex);
            }

            return(e.Handled);
        }
Exemplo n.º 2
0
        protected virtual bool OnDoorUse(DoorUseEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException();
            }

            try {
                if (this.DoorUse != null)
                {
                    this.DoorUse(this, e);
                }
            } catch (Exception ex) {
                this.ReportEventHandlerException("DoorUse", ex);
            }

            this.WriteHadnlerDebugInfo("DoorUse", e);
            return(e.Handled);
        }
    private void Net_DoorUse(object sender, DoorUseEventArgs e) {
      if (this.isDisposed || !this.hooksEnabled || e.Handled)
        return;

      if (this.CircuitHandler != null)
        e.Handled = this.CircuitHandler.HandleDoorUse(e.Player, e.Location, e.IsOpening, null, e.Direction);
    }
        protected virtual bool OnDoorUse(DoorUseEventArgs e)
        {
            Contract.Requires<ArgumentNullException>(e != null);

              try {
            if (this.DoorUse != null)
              this.DoorUse(this, e);
              } catch (Exception ex) {
            this.ReportEventHandlerException("DoorUse", ex);
              }

              return e.Handled;
        }
        private void Net_DoorUse(object sender, DoorUseEventArgs e)
        {
            if (this.isDisposed || !this.hooksEnabled || e.Handled)
            return;

              e.Handled = this.UserInteractionHandler.HandleDoorUse(e.Player, e.Location, e.IsOpening, e.Direction);
        }
Exemplo n.º 6
0
        private void Net_DoorUse(object sender, DoorUseEventArgs e)
        {
            if (this.isDisposed || !this.hooksEnabled || e.Handled)
            return;
              bool isOpening = false;
              if (e.action == DoorAction.OpenDoor || e.action == DoorAction.OpenTallGate || e.action == DoorAction.OpenTrapdoor)
            isOpening = true;

              e.Handled = this.UserInteractionHandler.HandleDoorUse(e.Player, e.Location, isOpening, e.Direction);
        }