public override void LoadFromXML(System.Xml.XmlNode node, ListView scene, ref Dictionary <uint, List <uint> > Depends) { XTools tools = new XTools(X); //XWater water = new XWater(ref X, tools.ParseXMLVector2(node.Attributes["PointOne"].InnerText), tools.ParseXMLVector2(node.Attributes["PointTwo"].InnerText), float.Parse(node.Attributes["Height"].InnerText)); XWater water = new XWater(ref X); water.Load(X.Content); water.AutoDraw = bool.Parse(node.Attributes["AutoDraw"].InnerText); water.ComponentID = uint.Parse(node.Attributes["ComponentID"].InnerText); water.DoesReflect = bool.Parse(node.Attributes["DoesReflect"].InnerText); water.DoesRefract = bool.Parse(node.Attributes["DoesRefract"].InnerText); water.DrawOrder = int.Parse(node.Attributes["DrawOrder"].InnerText); water.Height = float.Parse(node.Attributes["Height"].InnerText); water.Name = node.Attributes["Name"].InnerText; water.Rotation = X.Tools.ParseXMLQuaternion(node.Attributes["Rotation"].InnerText); water.Scale = X.Tools.ParseXMLVector3(node.Attributes["Scale"].InnerText); water.Translation = X.Tools.ParseXMLVector3(node.Attributes["Translation"].InnerText); water.WaveHeight = float.Parse(node.Attributes["WaveHeight"].InnerText); water.WaveLength = float.Parse(node.Attributes["WaveLength"].InnerText); water.WindDirection = float.Parse(node.Attributes["WindDirection"].InnerText); water.WindForce = float.Parse(node.Attributes["WindForce"].InnerText); X_Editor.Tools.AddXComponentToSceneList(scene, water, group); }
public override ListViewItem SetupListViewItem(ListViewItem item, XComponent component) { XWater water = new XWater(ref X); water.Load(X.Content); return(base.SetupListViewItem(item, water)); }
public override void UpdateObjectProperties(object Input, PropertyGrid Properties, ListView Scene) { XWater water = (XWater)Input; if (!water.loaded) { water.Load(X.Content); } base.UpdateObjectProperties(Input, Properties, Scene); }