Example #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]);
                    }
                }
            }
        }
        public PositionInfoMarker(PositionInfoMarker copyFrom) : this()
        {
            x               = copyFrom.x;
            y               = copyFrom.y;
            reachable       = copyFrom.reachable;
            transition      = copyFrom.transition;
            transitionAhead = copyFrom.transitionAhead;
            aheadDirection  = copyFrom.aheadDirection;
            aheadDistance   = copyFrom.aheadDistance;
            backDirection   = copyFrom.backDirection;
            backDistance    = copyFrom.backDistance;
            containsTrigger = copyFrom.containsTrigger;

            // TODO: incomplete
        }