Пример #1
0
    public void FromJSON(Dictionary <string, object> jsonData)
    {
        name = SerializableManager.GetStringValue(jsonData, "name");

        Spokes          = SerializableManager.GetIntValue(jsonData, "spokes");
        SpiralsPerSpoke = SerializableManager.GetIntValue(jsonData, "spokeSpirals");
        SpokeDistance   = SerializableManager.GetFloatValue(jsonData, "spokeDistance");

        PatternRotation = SerializableManager.GetFloatValue(jsonData, "patternRotation");
        SpokeRotation   = SerializableManager.GetFloatValue(jsonData, "spokeRotation");

        SpokeLengthMultiplier = SerializableManager.GetFloatValue(jsonData, "spokeLengthMulti");
        SpokeArcMultiplier    = SerializableManager.GetFloatValue(jsonData, "spokeArcMulti");
        SpokeCurlMultiplier   = SerializableManager.GetFloatValue(jsonData, "spokeCurlMulti");
    }
Пример #2
0
    public void FromJSON(Dictionary <string, object> jsonData)
    {
        name = (string)jsonData["name"];

        Width    = SerializableManager.GetFloatValue(jsonData, "width");
        Tapering = SerializableManager.GetFloatValue(jsonData, "tapering");

        TargetLength = SerializableManager.GetFloatValue(jsonData, "length");

        Arc  = SerializableManager.GetFloatValue(jsonData, "arc");
        Curl = SerializableManager.GetFloatValue(jsonData, "curl");

        TargetChildren = SerializableManager.GetIntValue(jsonData, "children");

        ChildLengthMultiplier = SerializableManager.GetFloatValue(jsonData, "childLengthMulti");
        ChildArcMultiplier    = SerializableManager.GetFloatValue(jsonData, "childArcMulti");
        ChildCurlMultiplier   = SerializableManager.GetFloatValue(jsonData, "childCurlMulti");

        ChildDepthLimit = SerializableManager.GetIntValue(jsonData, "childDepth");
        ChildSpread     = SerializableManager.GetFloatValue(jsonData, "childSpread");
        ChildRotation   = SerializableManager.GetFloatValue(jsonData, "childRotation");
    }