Esempio n. 1
0
        public Floor(Floor copyFrom) : this()
        {
            name        = copyFrom.name;
            height      = copyFrom.height;
            underground = copyFrom.underground;
            properties  = SDKUtil.CopyProperties(copyFrom.properties);

            foreach (string key in copyFrom.layerProps.Keys)
            {
                layerProps.Add(key, SDKUtil.CopyProperties(copyFrom.layerProps[key]));
            }
            foreach (BasicEntity entity in copyFrom.entities)
            {
                entities.Add(new BasicEntity(entity));
            }
            if (copyFrom.positionInfoMarker != null)
            {
                positionInfoMarker = new PositionInfoMarker[copyFrom.positionInfoMarker.GetLength(0), copyFrom.positionInfoMarker.GetLength(1)];
                for (int x = 0; x < copyFrom.positionInfoMarker.GetLength(0); x++)
                {
                    for (int y = 0; y < copyFrom.positionInfoMarker.GetLength(1); y++)
                    {
                        positionInfoMarker[x, y] = new PositionInfoMarker(copyFrom.positionInfoMarker[x, y]);
                    }
                }
            }
        }
Esempio n. 2
0
        public BasicEntity(BasicEntity copyFrom)
        {
            anchor    = copyFrom.anchor;
            position  = copyFrom.position;
            scale     = copyFrom.scale;
            height    = copyFrom.height;
            y         = copyFrom.y;
            maxY      = copyFrom.maxY;
            flipX     = copyFrom.flipX;
            flipZ     = copyFrom.flipZ;
            socket    = copyFrom.socket;
            wasSocket = copyFrom.wasSocket;
            autoFill  = copyFrom.autoFill;
            autoFillIgnoreDirection = copyFrom.autoFillIgnoreDirection;
            snap           = copyFrom.snap;
            isVirtual      = copyFrom.isVirtual;
            targetZone     = copyFrom.targetZone;
            targetLocation = copyFrom.targetLocation;
            locationId     = copyFrom.locationId;
            direction      = copyFrom.direction;

            key        = copyFrom.key;
            baseKey    = copyFrom.baseKey;
            lowKey     = copyFrom.lowKey;
            name       = copyFrom.name;
            layerName  = copyFrom.layerName;
            variable   = copyFrom.variable;
            variables  = copyFrom.variables == null ? null : new List <string>(copyFrom.variables);
            properties = SDKUtil.CopyProperties(copyFrom.properties);
        }
Esempio n. 3
0
 public ReplacementRule(ReplacementRule copyFrom) : this()
 {
     type            = copyFrom.type;
     key             = copyFrom.key;
     keys            = copyFrom.keys;
     objectKey       = copyFrom.objectKey;
     randomMaterials = copyFrom.randomMaterials;
     randomObjects   = copyFrom.randomObjects;
     validZones      = copyFrom.validZones;
     orientation     = copyFrom.orientation;
     properties      = SDKUtil.CopyProperties(copyFrom.properties);
 }
Esempio n. 4
0
        public Zone(Zone copyFrom) : this()
        {
            name                  = copyFrom.name;
            minSize               = copyFrom.minSize;
            curSize               = copyFrom.curSize;
            offset                = copyFrom.offset;
            offsetRaw             = copyFrom.offsetRaw;
            scenePath             = copyFrom.scenePath;
            availableTime         = copyFrom.availableTime;
            hasAmbientColor       = copyFrom.hasAmbientColor;
            hasBackgroundColor    = copyFrom.hasBackgroundColor;
            hasLightColor         = copyFrom.hasLightColor;
            hasLightIntensity     = copyFrom.hasLightIntensity;
            ambientColor          = copyFrom.ambientColor;
            lightColor            = copyFrom.lightColor;
            lightIntensity        = copyFrom.lightIntensity;
            backgroundColor       = copyFrom.backgroundColor;
            chapter               = copyFrom.chapter;
            createCheckpoint      = copyFrom.createCheckpoint;
            isExit                = copyFrom.isExit;
            isIntro               = copyFrom.isIntro;
            reactivateTransitions = copyFrom.reactivateTransitions;
            invisibleGround       = copyFrom.invisibleGround;
            music                 = copyFrom.music;
            randomMusic           = copyFrom.randomMusic;
            skybox                = copyFrom.skybox;
            blockAgents           = copyFrom.blockAgents;
            variationOf           = copyFrom.variationOf;
            originalName          = copyFrom.originalName;
            properties            = SDKUtil.CopyProperties(copyFrom.properties);

            foreach (Floor floor in copyFrom.floors)
            {
                Floor copy = new Floor(floor);
                copy.positionInfoMarker = floor.positionInfoMarker; // FIXME: quick-fix for retaining challenge mode correctly until copy-constructor for position info exists

                floors.Add(copy);
            }
        }