public new T Pop() { T item = base.Pop(); OnPush?.Invoke(); return(item); }
public void GetRepulsed(Vector3 force, ForceMode forceMode = ForceMode.VelocityChange) { if (!IsActive) { return; } OnPush?.Invoke(force); switch (forceMode) { case ForceMode.Acceleration: _rb.AddForce(force, ForceMode.Acceleration); break; case ForceMode.VelocityChange: _rb.AddForce(force, ForceMode.VelocityChange); break; case ForceMode.Impulse: _rb.AddForce(force, ForceMode.Impulse); break; case ForceMode.Force: _rb.AddForce(force, ForceMode.Force); break; } }
private void TxtInStock_ButtonClick(object sender, EventArgs e) { try { if (this._product == null) { return; } if (int.TryParse(this.txtInStock.Text, out int inStock)) { // Validar cantidad if (inStock <= 0) { throw new Exception("La cantidad debe ser mayor a cero."); } // Validar cantidad disponible. if (this.Filter.WarehouseID != null && inStock > this._product.AvailableQuantity) { throw new Exception("La cantidad no puede ser mayor a la cantidad disponible del producto"); } this.txtInStock.Clear(); OnPush?.Invoke(inStock, this._product); } } catch (Exception ex) { ex.ShowDialog(MessageBoxIcon.Warning); } }
// Pool an item public void Push(T obj) { if (obj == null) { return; } OnPush?.Invoke(obj); _pool.Push(obj); }
public bool enPool(T obj) { if (obj != null) { OnPush.Invoke(obj); avaliableItems.Enqueue(obj); return(true); } else { return(false); } }
public override async Task <PushResponse> Push( IAsyncStreamReader <Rumor> requestStream, ServerCallContext context) { var rumors = new List <Rumor>(); while (!context.CancellationToken.IsCancellationRequested && await requestStream.MoveNext(context.CancellationToken)) { var rumor = requestStream.Current; rumors.Add(rumor); } OnPush?.Invoke(this, new PushRumorEventArgs { Rumors = rumors, }); return(new PushResponse()); }
private bool Populate(T blueprint, int count, Transform transform = null) { parent = this.parent; T startObj = CreateObject(blueprint); if (startObj == null) { throw new Exception(); } avaliableItems.Enqueue(startObj); OnPush.Invoke(startObj); for (int i = 1; i < count; i++) { startObj = CreateObject(blueprint); avaliableItems.Enqueue(startObj); OnPush.Invoke(startObj); } return(true); }
public override void DidPush() { if (OnPush != null) { OnPush.Invoke(); } if (m_components != null) { foreach (var c in m_components) { c.DidPush(this.m_dataObject); } } //Populate(); //DidShow(); //base.DidPush(); }
public new void Push(T item) { OnPush?.Invoke(item); base.Push(item); }
public new void Push(T item) { base.Push(item); OnPush?.Invoke(); }
protected virtual void OnPushEvent(WebhookEventArgs e) { OnPush?.Invoke(this, e); }
public void Push(PointF direction, PointF?source) => OnPush?.Invoke(direction, source);
public virtual void Push(T item) { stack.Push(item); OnPush?.Invoke(item); }