public override void Assemble(ObjectModel model, BoxCollider2D target, AssemblyContext context)
        {
            Vector2Assembler assembler = new Vector2Assembler();

            target.offset = assembler.AssembleValue(model.GetObject("Offset"), context);
            target.size   = assembler.AssembleValue(model.GetObject("Size"), context);
        }
        public override void Assemble(ObjectModel model, CircleCollider2D target, AssemblyContext context)
        {
            Vector2Assembler vs = new Vector2Assembler();

            target.radius         = model.GetValue <float>("Radius");
            target.offset         = vs.AssembleValue(model.GetObject("Offset"), context);
            target.isTrigger      = model.GetValue <bool>("IsTrigger");
            target.usedByEffector = model.GetValue <bool>("UsedByEffector");
        }
        public override ObjectModel Disassemble(BoxCollider2D source, DisassemblyContext context)
        {
            Vector2Assembler assembler = new Vector2Assembler();

            return(new ObjectModel(
                       new ObjectField("Offset", assembler.DisassembleValue(source.offset, context)),
                       new ObjectField("Size", assembler.DisassembleValue(source.size, context))
                       ));
        }
        public override ObjectModel Disassemble(CircleCollider2D source, DisassemblyContext context)
        {
            Vector2Assembler vs = new Vector2Assembler();

            return(new ObjectModel(
                       new ObjectField("Radius", new PrimitiveModel(source.radius)),
                       new ObjectField("Offset", vs.DisassembleValue(source.offset, context)),
                       new ObjectField("IsTrigger", new PrimitiveModel(source.isTrigger)),
                       new ObjectField("UsedByEffector", new PrimitiveModel(source.usedByEffector))));
        }