protected virtual void Parse(XmlElement element, Timeline timeline) { string curveString = element.GetString("curve_type", "linear"); switch (curveString) { case "instant": CurveType = Spriter.CurveType.Instant; break; case "linear": CurveType = Spriter.CurveType.Linear; break; case "quadratic": CurveType = Spriter.CurveType.Quadratic; break; case "cubic": CurveType = Spriter.CurveType.Cubic; break; case "quartic": CurveType = Spriter.CurveType.Quartic; break; case "quintic": CurveType = Spriter.CurveType.Quintic; break; default: CurveType = Spriter.CurveType.INVALID; break; } Timeline = timeline; GetCurveParams(element); }
protected override void Parse(XmlElement element, Timeline timeline) { base.Parse(element, timeline); var boneElem = element["bone"]; Spatial = new SpatialInfo(boneElem); Color tint = Color.white; tint.r = boneElem.GetFloat("r", 1.0f); tint.g = boneElem.GetFloat("g", 1.0f); tint.b = boneElem.GetFloat("b", 1.0f); tint.a = boneElem.GetFloat("a", 1.0f); Tint = tint; }
protected override void Parse(XmlElement element, Timeline timeline) { base.Parse(element, timeline); var objElement = element[XmlKey]; File = GetFile(objElement); Spatial = new SpatialInfo(objElement); Vector2 pivot; pivot.x = objElement.GetFloat("pivot_x", 0); pivot.y = objElement.GetFloat("pivot_y", 0); Color tint = Color.white; tint.r = objElement.GetFloat("r", 1.0f); tint.g = objElement.GetFloat("g", 1.0f); tint.b = objElement.GetFloat("b", 1.0f); tint.a = objElement.GetFloat("a", 1.0f); Tint = tint; }
public BoneTimelineKey(XmlElement element, Timeline timeline) : base(element, timeline) { }
public TimelineKey(XmlElement element, Timeline timeline) : base(element) { Parse(element, timeline); }
public SpriteTimelineKey(XmlElement element, Timeline timeline) : base(element, timeline) { }
public SpatialTimelineKey(XmlElement element, Timeline timeline) : base(element, timeline) { }
protected virtual void Parse(XmlElement element, Timeline timeline) { Timeline = timeline; }