public static JsonObject serialize(DragForceFeature feature) { JsonObject obj = new JsonObject(JsonObject.JsonType.OBJECT); obj["magnitude"] = feature.value; return(obj); }
public override ParticleFeature create(JsonObject initData) { float val = 0f; if (initData["magnitude"] != null) { val = (float)initData["magnitude"]; } DragForceFeature lf = new DragForceFeature(val); return(lf); }