/// <summary> /// Translates the information in each ComponentPropertiesTabPage to a List of PhysicsGroups. /// </summary> /// <returns>The translation</returns> public List <PropertySet> TranslateToPropertySets() { List <PropertySet> translation = new List <PropertySet>(); foreach (TabPage t in TabPages) { if (t is ComponentPropertiesTabPage) { ComponentPropertiesTabPage tabPage = (ComponentPropertiesTabPage)t; tabPage.Invoke(new Action(() => { translation.Add(new PropertySet( tabPage.Name, tabPage.ChildForm.GetCollider(), tabPage.ChildForm.GetFriction(), tabPage.ChildForm.GetMass())); })); } } return(translation); }
/// <summary> /// Translates the information in each ComponentPropertiesTabPage to a List of PhysicsGroups. /// </summary> /// <returns>The translation</returns> public Exporter.Gamepiece[] TranslateToGamepieces() { List <Exporter.Gamepiece> translation = new List <Exporter.Gamepiece>(); foreach (TabPage t in TabPages) { if (t is ComponentPropertiesTabPage) { ComponentPropertiesTabPage tabPage = (ComponentPropertiesTabPage)t; tabPage.Invoke(new Action(() => { Exporter.Gamepiece gp = tabPage.ChildForm.Gamepiece; if (gp != null) { translation.Add(gp); } })); } } return(translation.ToArray()); }