コード例 #1
0
ファイル: CSSItem.cs プロジェクト: CG-Tespy/CyberSidescroller
    void AnnounceUsage(MonoBehaviour usedOn)
    {
        UsageArgs <CSSItem> usageArgs = new UsageArgs <CSSItem>(this, usedOn);

        Used.Invoke(usageArgs);

        //Debug.Log("Used " + this.name);
    }
コード例 #2
0
 public void Using()
 {
     Durability = (Durability + DurabiliryPerHit <= 100 ? DurabiliryPerHit + Durability : 100);
     Used?.Invoke(this, new UsedEventArgs()
     {
         Used = Durability
     });
 }
コード例 #3
0
 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();
        }
コード例 #5
0
        private void DestroyingHandler(GameObject obj)
        {
            if (TargetingArrow != null)
            {
                Object.Destroy(TargetingArrow.gameObject);
                TargetingArrow = null;
            }

            Used?.Invoke();
        }
コード例 #6
0
ファイル: Equip.cs プロジェクト: Jav800/AbstractFactory
        public virtual void Using()
        {
            int oldDurability = Durability;

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