Beispiel #1
0
    void AnnounceUsage(MonoBehaviour usedOn)
    {
        UsageArgs <CSSItem> usageArgs = new UsageArgs <CSSItem>(this, usedOn);

        Used.Invoke(usageArgs);

        //Debug.Log("Used " + this.name);
    }
Beispiel #2
0
 public void Using()
 {
     Durability = (Durability + DurabiliryPerHit <= 100 ? DurabiliryPerHit + Durability : 100);
     Used?.Invoke(this, new UsedEventArgs()
     {
         Used = Durability
     });
 }
 public void Heal(float amount)
 {
     if (amount < 0)
     {
         throw new ArgumentOutOfRangeException(nameof(amount));
     }
     _health.Value += amount;
     Used?.Invoke();
 }
        private void Button1_Click(object sender, EventArgs e)
        {
            SingleCast_Delegate sObj = new SingleCast_Delegate();
            Use  obj  = new Use(sObj.Display);
            Used obj1 = new Used(SingleCast_Delegate.show);

            MessageBox.Show(obj("Jay Jagadeshwar"));
            obj1.Invoke();
        }
Beispiel #5
0
        private void DestroyingHandler(GameObject obj)
        {
            if (TargetingArrow != null)
            {
                Object.Destroy(TargetingArrow.gameObject);
                TargetingArrow = null;
            }

            Used?.Invoke();
        }
Beispiel #6
0
        public virtual void Using()
        {
            int oldDurability = Durability;

            Durability = Durability + DurabiliryPerHit < 100 ? DurabiliryPerHit + Durability : 100;
            Used?.Invoke(this, new UsedEventArgs()
            {
                Used = Durability - oldDurability
            });
        }
Beispiel #7
0
 public ConnectHandle ConnectSendObserver(ISendObserver observer)
 {
     Used?.Invoke();
     return(_endpoint.ConnectSendObserver(observer));
 }
Beispiel #8
0
 protected virtual void OnUsed()
 {
     Used?.Invoke(this, EventArgs.Empty);
 }
Beispiel #9
0
 public void Send(IMessage message)
 {
     Used?.Invoke();
     _producer.Send(message);
 }
 public Task Produce <T>(IEnumerable <object> values, IPipe <EventHubSendContext <T> > pipe, CancellationToken cancellationToken = default)
     where T : class
 {
     Used?.Invoke();
     return(_producer.Produce(values, pipe, cancellationToken));
 }
Beispiel #11
0
 public void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority, TimeSpan timeToLive)
 {
     Used?.Invoke();
     _producer.Send(destination, message, deliveryMode, priority, timeToLive);
 }
Beispiel #12
0
 public IStreamMessage CreateStreamMessage()
 {
     Used?.Invoke();
     return(_producer.CreateStreamMessage());
 }
Beispiel #13
0
 public Task Send(object message, Type messageType, IPipe <SendContext> pipe, CancellationToken cancellationToken = new CancellationToken())
 {
     Used?.Invoke();
     return(_endpoint.Send(message, messageType, pipe, cancellationToken));
 }
 public ConnectHandle ConnectSendObserver(ISendObserver observer)
 {
     Used?.Invoke();
     return(_producer.ConnectSendObserver(observer));
 }
Beispiel #15
0
 public IBytesMessage CreateBytesMessage(byte[] body)
 {
     Used?.Invoke();
     return(_producer.CreateBytesMessage(body));
 }
Beispiel #16
0
 public IObjectMessage CreateObjectMessage(object body)
 {
     Used?.Invoke();
     return(_producer.CreateObjectMessage(body));
 }
Beispiel #17
0
 public IMapMessage CreateMapMessage()
 {
     Used?.Invoke();
     return(_producer.CreateMapMessage());
 }
Beispiel #18
0
 public ITextMessage CreateTextMessage(string text)
 {
     Used?.Invoke();
     return(_producer.CreateTextMessage(text));
 }
Beispiel #19
0
 public ITextMessage CreateTextMessage()
 {
     Used?.Invoke();
     return(_producer.CreateTextMessage());
 }
Beispiel #20
0
 public Task Send <T>(T message, IPipe <SendContext> pipe, CancellationToken cancellationToken = new CancellationToken()) where T : class
 {
     Used?.Invoke();
     return(_endpoint.Send(message, pipe, cancellationToken));
 }
Beispiel #21
0
 public Task Send(object message, CancellationToken cancellationToken = new CancellationToken())
 {
     Used?.Invoke();
     return(_endpoint.Send(message, cancellationToken));
 }
 void NotifyUsed()
 {
     Used?.Invoke();
 }
Beispiel #23
0
 public Task Send <T>(object values, IPipe <SendContext> pipe, CancellationToken cancellationToken = new CancellationToken()) where T : class
 {
     Used?.Invoke();
     return(_endpoint.Send <T>(values, pipe, cancellationToken));
 }
 public Task Produce <T>(IEnumerable <object> values, CancellationToken cancellationToken = default)
     where T : class
 {
     Used?.Invoke();
     return(_producer.Produce <T>(values, cancellationToken));
 }
 public Task Produce <T>(T message, CancellationToken cancellationToken = default)
     where T : class
 {
     Used?.Invoke();
     return(_producer.Produce(message, cancellationToken));
 }
Beispiel #26
0
 public void Send(IDestination destination, IMessage message)
 {
     Used?.Invoke();
     _producer.Send(destination, message);
 }
 public Task Send <T>(T message, IPipe <SendContext <T> > pipe, CancellationToken cancellationToken)
     where T : class
 {
     Used?.Invoke();
     return(_sendTransport.Send(message, pipe, cancellationToken));
 }
 public Task Produce <T>(T message, IPipe <EventHubSendContext <T> > pipe, CancellationToken cancellationToken = default)
     where T : class
 {
     Used?.Invoke();
     return(_producer.Produce(message, pipe, cancellationToken));
 }