private void Dt_TableNewRow(object sender, DataTableNewRowEventArgs e) { T p = Activator.CreateInstance <T>(); GameObjectList list = (GameObjectList)GetDataList(scen); int id = list.GetFreeGameObjectID(); e.Row["id"] = id; p.ID = id; list.Add(p); }
public int GetFreeGameObjectID() { return(list.GetFreeGameObjectID()); }