public static JsonObject serialize(TangentialForceFeature 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"]; } TangentialForceFeature lf = new TangentialForceFeature(val); return(lf); }