public void ApplyBeh(int Index) { Twinsanity.Behavior Beh = new Twinsanity.Behavior(); Beh.Cord.X = float.Parse(XVal.Text); Beh.Cord.Y = float.Parse(YVal.Text); Beh.Cord.Z = float.Parse(ZVal.Text); Beh.Cord.W = float.Parse(WVal.Text); Beh.Num = UInt16.Parse(NumVal.Text); Beh.ID = ItemId; twinsanityEditorForm.LevelData.Put_Item(Beh, TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[1].Nodes[Index])); }
public void UpdateBeh(int Index) { Twinsanity.Behavior Beh = (Twinsanity.Behavior)twinsanityEditorForm.LevelData.Get_Item(TwinsanityEditorForm.CalculateIndexes(twinsanityEditorForm.TreeView1.Nodes[0].Nodes[IISIndex].Nodes[1].Nodes[Index])); XVal.Text = Beh.Cord.X.ToString(); YVal.Text = Beh.Cord.Y.ToString(); ZVal.Text = Beh.Cord.Z.ToString(); WVal.Text = Beh.Cord.W.ToString(); NumVal.Text = Beh.Num.ToString(); ItemId = Beh.ID; this.Text = "ID: " + Beh.ID.ToString(); }