internal Vector2DEasingParamater() { Start = new Value.Vector2DWithRandom(0, 0); End = new Value.Vector2DWithRandom(0, 0); StartSpeed = new Value.Enum <EasingStart>(EasingStart.Start); EndSpeed = new Value.Enum <EasingEnd>(EasingEnd.End); }
public static void LoadFromElement(XmlElement e, Value.Vector2DWithRandom value, bool isClip) { var e_x = e["X"] as XmlElement; var e_y = e["Y"] as XmlElement; var e_da = e["DrawnAs"]; // Convert Vector2D into Vector2DWithRandom if (e_da == null && e_x != null && e_y != null && e_x["Max"] == null && e_y["Max"] == null) { var x = e_x.GetTextAsFloat(); var y = e_y.GetTextAsFloat(); value.X.SetCenter(x); value.Y.SetCenter(y); } else { if (e_x != null) { LoadFromElement(e_x, value.X, isClip); } if (e_y != null) { LoadFromElement(e_y, value.Y, isClip); } if (e_da != null) { value.DrawnAs = (DrawnAs)e_da.GetTextAsInt(); } } }
public CustomDataParameter(int customDataNum) { this.customDataNum = customDataNum; CustomData = new Value.Enum <CustomDataType>(); Fixed = new Value.Vector2D(); Random = new Value.Vector2DWithRandom(); Easing = new Vector2DEasingParamater(); FCurve = new Value.FCurveVector2D(); Fixed4 = new Value.Vector4D(); FCurveColor = new Value.FCurveColorRGBA(); }
public static void LoadFromElement(XmlElement e, Value.Vector2DWithRandom value, bool isClip) { var e_x = e["X"] as XmlElement; var e_y = e["Y"] as XmlElement; var e_da = e["DrawnAs"]; if (e_x != null) { LoadFromElement(e_x, value.X, isClip); } if (e_y != null) { LoadFromElement(e_y, value.Y, isClip); } if (e_da != null) { value.DrawnAs = (DrawnAs)e_da.GetTextAsInt(); } }
public static XmlElement SaveToElement(XmlDocument doc, string element_name, Value.Vector2DWithRandom value, bool isClip) { var e = doc.CreateElement(element_name); var x = SaveToElement(doc, "X", value.X, isClip); var y = SaveToElement(doc, "Y", value.Y, isClip); var da = value.DefaultDrawnAs != value.DrawnAs ? doc.CreateTextElement("DrawnAs", (int)value.DrawnAs) : null; if (x != null) { e.AppendChild(x); } if (y != null) { e.AppendChild(y); } if (da != null) { e.AppendChild(da); } return(e.ChildNodes.Count > 0 ? e : null); }
internal PVALocation(float x = 0.0f, float y = 0.0f) { Location = new Value.Vector2DWithRandom(x, y); Velocity = new Value.Vector2DWithRandom(0, 0); Acceleration = new Value.Vector2DWithRandom(0, 0); }
public UVScrollParamater() { Start = new Value.Vector2DWithRandom(); Size = new Value.Vector2DWithRandom(); Speed = new Value.Vector2DWithRandom(); }
internal Vector2DEasingParamater() { Start = new Value.Vector2DWithRandom(0, 0); End = new Value.Vector2DWithRandom(0, 0); StartSpeed = new Value.Enum<EasingStart>(EasingStart.Start); EndSpeed = new Value.Enum<EasingEnd>(EasingEnd.End); }