public void ReadFromData(FieldDataComponent d)
 {// reads from the data so user can see the same values from the last time they entered them
     try
     {
         field = d;
         if (field.colliderType == ColliderType.Sphere)
         {
             colliderTypeCombobox.SelectedIndex = 1;
         }
         else if (field.colliderType == ColliderType.Mesh)
         {
             colliderTypeCombobox.SelectedIndex = 2;
         }
         else
         {
             colliderTypeCombobox.SelectedIndex = 0;
         }
         if (field.Dynamic)
         {
             dynamicGroupBox.Enabled = true;
         }
         else
         {
             dynamicGroupBox.Enabled = false;
             massNumericUpDown.Value = 0;
         }
         frictionTrackBar.Value  = (int)field.Friction;
         massNumericUpDown.Value = (decimal)field.Mass;
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
 }
 public void readFromData(FieldDataComponent d)
 {// reads from the data so user can see the same values from the last time they entered them
     field = d;
     xScaleUpDown.Value = (decimal)field.X;
     yScaleUpDown.Value = (decimal)field.Y;
     zScaleUpDown.Value = (decimal)field.Z;
 }
예제 #3
0
 public void copyToNewComponent(FieldDataComponent f)
 {
     f.colliderType = this.colliderType;
     f.X            = this.X;
     f.Y            = this.Y;
     f.Z            = this.Z;
     f.Scale        = this.Scale;
     f.Friction     = this.Friction;
     f.Dynamic      = this.Dynamic;
     f.Mass         = this.Mass;
 }
예제 #4
0
 public void copyToNewComponent(FieldDataComponent f)
 {
     f.colliderType = colliderType;
     f.X            = X;
     f.Y            = Y;
     f.Z            = Z;
     f.Scale        = Scale;
     f.Friction     = Friction;
     f.Dynamic      = Dynamic;
     f.Mass         = Mass;
     f.ID           = ID;
 }
 public void readFromData(FieldDataComponent d)  // reads from the data so user can see the same values from the last time they entered them, just here so the calling methods doesn't throw a fit
 {
     field = d;
 }