예제 #1
0
        public static JsonObject serialize(ScaleFeature feature)
        {
            JsonObject obj   = new JsonObject(JsonObject.JsonType.OBJECT);
            JsonObject scale = feature.scale;

            obj["scale"] = scale;
            return(obj);
        }
예제 #2
0
        public override ParticleFeature create(JsonObject initData)
        {
            Vector3 vec = new Vector3();

            if (initData["scale"] != null)
            {
                JsonObject v = initData["scale"];
                vec.X = (float)v["x"];
                vec.Y = (float)v["y"];
                vec.Z = (float)v["z"];
            }
            ScaleFeature lf = new ScaleFeature(vec);

            return(lf);
        }