// Update is called once per frame void Update() { float dt = Time.deltaTime; updateEntityAnimation?.Invoke(dt); updateEntity?.Invoke(dt); stateMachine.Update(dt); timer.Update(dt); }
private async void StdDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) { await Task.Factory.StartNew(() => { DataGridView senderGrid = (DataGridView)sender; if (!(senderGrid.Columns[e.ColumnIndex] is StdDataGridViewFunctionColumn) || e.RowIndex < 0) { return; } switch (senderGrid.Rows[e.RowIndex].Cells["Function"].Value) { case "Add": var myRow = (T)senderGrid.Rows[e.RowIndex].DataBoundItem; if (myRow is null) { MessageBox.Show("" + e.RowIndex + " myRow is null"); } else { Add?.Invoke(sender, myRow); } break; case "Remove": StdDataGridView_UserDeletingRow(sender, new DataGridViewRowCancelEventArgs(senderGrid.Rows[e.RowIndex])); break; case "Update": var myUpdatedRow = (T)senderGrid.Rows[e.RowIndex].DataBoundItem; UpdateEntity?.Invoke(sender, myUpdatedRow); break; default: MessageBox.Show(@"??? "); break; } }).ConfigureAwait(false); }
protected void OnUpdate(UpdateArgs <Class> e) { UpdateEntity?.Invoke(this, e); }