コード例 #1
0
        public static JsonObject serialize(TangentialForceFeature feature)
        {
            JsonObject obj = new JsonObject(JsonObject.JsonType.OBJECT);

            obj["magnitude"] = feature.value;
            return(obj);
        }
コード例 #2
0
        public override ParticleFeature create(JsonObject initData)
        {
            float val = 0f;

            if (initData["magnitude"] != null)
            {
                val = (float)initData["magnitude"];
            }
            TangentialForceFeature lf = new TangentialForceFeature(val);

            return(lf);
        }