Exemple #1
0
        public MainItemVO(MainItemVO vo)
        {
            uniqueId       = vo.uniqueId;
            itemIdentifier = vo.itemIdentifier;
            itemName       = vo.itemName;
            if (tags != null)
            {
                tags = (string[])vo.tags.Clone();
            }
            customVars = vo.customVars;
            x          = vo.x;
            y          = vo.y;
            rotation   = vo.rotation;
            zIndex     = vo.zIndex;
            layerName  = vo.layerName;
            if (vo.tint != null)
            {
                tint = (float[])vo.tint.Clone();
            }
            scaleX  = vo.scaleX;
            scaleY  = vo.scaleY;
            originX = vo.originX;
            originY = vo.originY;

            if (vo.shape != null)
            {
                shape = vo.shape.clone();
            }

            if (vo.physics != null)
            {
                physics = new PhysicsBodyDataVO(vo.physics);
            }
        }
Exemple #2
0
 public PhysicsBodyDataVO(PhysicsBodyDataVO vo)
 {
     bodyType          = vo.bodyType;
     mass              = vo.mass;
     centerOfMass      = vo.centerOfMass;
     rotationalInertia = vo.rotationalInertia;
     damping           = vo.damping;
     gravityScale      = vo.gravityScale;
     allowSleep        = vo.allowSleep;
     sensor            = vo.sensor;
     awake             = vo.awake;
     bullet            = vo.bullet;
     density           = vo.density;
     friction          = vo.friction;
     restitution       = vo.restitution;
 }