public StageItem StageValue(string name, object value) { Rect rect = (Rect)value; return(new StageElement(name, new StageItem[] { SerializationMaster.ToStageAttribute("left", rect.xMin), SerializationMaster.ToStageAttribute("top", rect.yMin), SerializationMaster.ToStageAttribute("width", rect.width), SerializationMaster.ToStageAttribute("height", rect.height) })); }
public StageItem StageValue(string name, object value) { Color color = (Color)value; return(new StageElement(name, new StageItem[] { SerializationMaster.ToStageAttribute("r", color.r), SerializationMaster.ToStageAttribute("g", color.g), SerializationMaster.ToStageAttribute("b", color.b), SerializationMaster.ToStageAttribute("a", color.a) })); }
public StageItem StageValue(string name, object value) { Keyframe[] keyframeArray = ((AnimationCurve)value).keys; StageElement stageElement = new StageElement(name); for (int i = 0; i < (int)keyframeArray.Length; i++) { Keyframe keyframe = keyframeArray[i]; stageElement.Add(new StageElement("key", new StageItem[] { SerializationMaster.ToStageAttribute("time", keyframe.time), SerializationMaster.ToStageAttribute("value", keyframe.@value), SerializationMaster.ToStageAttribute("inTangent", keyframe.inTangent), SerializationMaster.ToStageAttribute("outTangent", keyframe.outTangent), SerializationMaster.ToStageAttribute("tangentMode", keyframe.tangentMode) })); } return(stageElement); }
public StageItem StageValue(string name, object value) { Bounds bound = (Bounds)value; return(new StageElement(name, new StageItem[] { SerializationMaster.ToStageAttribute("center.x", bound.center.x), SerializationMaster.ToStageAttribute("center.y", bound.center.y), SerializationMaster.ToStageAttribute("center.z", bound.center.z), SerializationMaster.ToStageAttribute("size.x", bound.size.x), SerializationMaster.ToStageAttribute("size.y", bound.size.y), SerializationMaster.ToStageAttribute("size.z", bound.size.z) })); }
public StageItem StageValue(string name, object value) { Vector4 vector4 = (Vector4)value; return(new StageElement(name, new StageItem[] { SerializationMaster.ToStageAttribute("x", vector4.x), SerializationMaster.ToStageAttribute("y", vector4.y), SerializationMaster.ToStageAttribute("z", vector4.z), SerializationMaster.ToStageAttribute("w", vector4.w) })); }
public StageItem StageValue(string name, object value) { Vector2 vector2 = (Vector2)value; return(new StageElement(name, new StageItem[] { SerializationMaster.ToStageAttribute("x", vector2.x), SerializationMaster.ToStageAttribute("y", vector2.y) })); }