Exemple #1
0
        public AnchorTypesModule(AnchorTypesModule copyFrom = null)
        {
            if (copyFrom == null)
            {
                this.tileValid      = (int[])null;
                this.tileInvalid    = (int[])null;
                this.tileAlternates = (int[])null;
                this.wallValid      = (int[])null;
            }
            else
            {
                if (copyFrom.tileValid == null)
                {
                    this.tileValid = (int[])null;
                }
                else
                {
                    this.tileValid = new int[copyFrom.tileValid.Length];
                    Array.Copy((Array)copyFrom.tileValid, (Array)this.tileValid, this.tileValid.Length);
                }

                if (copyFrom.tileInvalid == null)
                {
                    this.tileInvalid = (int[])null;
                }
                else
                {
                    this.tileInvalid = new int[copyFrom.tileInvalid.Length];
                    Array.Copy((Array)copyFrom.tileInvalid, (Array)this.tileInvalid, this.tileInvalid.Length);
                }

                if (copyFrom.tileAlternates == null)
                {
                    this.tileAlternates = (int[])null;
                }
                else
                {
                    this.tileAlternates = new int[copyFrom.tileAlternates.Length];
                    Array.Copy((Array)copyFrom.tileAlternates, (Array)this.tileAlternates,
                               this.tileAlternates.Length);
                }

                if (copyFrom.wallValid == null)
                {
                    this.wallValid = (int[])null;
                }
                else
                {
                    this.wallValid = new int[copyFrom.wallValid.Length];
                    Array.Copy((Array)copyFrom.wallValid, (Array)this.wallValid, this.wallValid.Length);
                }
            }
        }
		public AnchorTypesModule(AnchorTypesModule copyFrom = null)
		{
			if (copyFrom == null)
			{
				this.tileValid = null;
				this.tileInvalid = null;
				this.tileAlternates = null;
				this.wallValid = null;
				return;
			}
			if (copyFrom.tileValid == null)
			{
				this.tileValid = null;
			}
			else
			{
				this.tileValid = new int[copyFrom.tileValid.Length];
				Array.Copy(copyFrom.tileValid, this.tileValid, this.tileValid.Length);
			}
			if (copyFrom.tileInvalid == null)
			{
				this.tileInvalid = null;
			}
			else
			{
				this.tileInvalid = new int[copyFrom.tileInvalid.Length];
				Array.Copy(copyFrom.tileInvalid, this.tileInvalid, this.tileInvalid.Length);
			}
			if (copyFrom.tileAlternates == null)
			{
				this.tileAlternates = null;
			}
			else
			{
				this.tileAlternates = new int[copyFrom.tileAlternates.Length];
				Array.Copy(copyFrom.tileAlternates, this.tileAlternates, this.tileAlternates.Length);
			}
			if (copyFrom.wallValid == null)
			{
				this.wallValid = null;
				return;
			}
			this.wallValid = new int[copyFrom.wallValid.Length];
			Array.Copy(copyFrom.wallValid, this.wallValid, this.wallValid.Length);
		}
 public AnchorTypesModule(AnchorTypesModule copyFrom = null)
 {
     if (copyFrom == null)
     {
         this.tileValid      = null;
         this.tileInvalid    = null;
         this.tileAlternates = null;
         this.wallValid      = null;
         return;
     }
     if (copyFrom.tileValid != null)
     {
         this.tileValid = new int[(int)copyFrom.tileValid.Length];
         Array.Copy(copyFrom.tileValid, this.tileValid, (int)this.tileValid.Length);
     }
     else
     {
         this.tileValid = null;
     }
     if (copyFrom.tileInvalid != null)
     {
         this.tileInvalid = new int[(int)copyFrom.tileInvalid.Length];
         Array.Copy(copyFrom.tileInvalid, this.tileInvalid, (int)this.tileInvalid.Length);
     }
     else
     {
         this.tileInvalid = null;
     }
     if (copyFrom.tileAlternates != null)
     {
         this.tileAlternates = new int[(int)copyFrom.tileAlternates.Length];
         Array.Copy(copyFrom.tileAlternates, this.tileAlternates, (int)this.tileAlternates.Length);
     }
     else
     {
         this.tileAlternates = null;
     }
     if (copyFrom.wallValid == null)
     {
         this.wallValid = null;
         return;
     }
     this.wallValid = new int[(int)copyFrom.wallValid.Length];
     Array.Copy(copyFrom.wallValid, this.wallValid, (int)this.wallValid.Length);
 }
Exemple #4
0
 public AnchorTypesModule(AnchorTypesModule copyFrom = null)
 {
     if (copyFrom == null)
     {
         tileValid      = null;
         tileInvalid    = null;
         tileAlternates = null;
         wallValid      = null;
         return;
     }
     if (copyFrom.tileValid == null)
     {
         tileValid = null;
     }
     else
     {
         tileValid = new int[copyFrom.tileValid.Length];
         Array.Copy(copyFrom.tileValid, tileValid, tileValid.Length);
     }
     if (copyFrom.tileInvalid == null)
     {
         tileInvalid = null;
     }
     else
     {
         tileInvalid = new int[copyFrom.tileInvalid.Length];
         Array.Copy(copyFrom.tileInvalid, tileInvalid, tileInvalid.Length);
     }
     if (copyFrom.tileAlternates == null)
     {
         tileAlternates = null;
     }
     else
     {
         tileAlternates = new int[copyFrom.tileAlternates.Length];
         Array.Copy(copyFrom.tileAlternates, tileAlternates, tileAlternates.Length);
     }
     if (copyFrom.wallValid == null)
     {
         wallValid = null;
         return;
     }
     wallValid = new int[copyFrom.wallValid.Length];
     Array.Copy(copyFrom.wallValid, wallValid, wallValid.Length);
 }
Exemple #5
0
 public TileObjectData(TileObjectData copyFrom = null)
 {
     this._parent = null;
     this._linkedAlternates = false;
     if (copyFrom == null)
     {
         this._usesCustomCanPlace = false;
         this._alternates = null;
         this._anchor = null;
         this._anchorTiles = null;
         this._tileObjectBase = null;
         this._liquidDeath = null;
         this._liquidPlacement = null;
         this._placementHooks = null;
         this._tileObjectDraw = null;
         this._tileObjectStyle = null;
         this._tileObjectCoords = null;
         return;
     }
     this.CopyFrom(copyFrom);
 }
Exemple #6
0
 private void SetupBaseObject()
 {
     this._alternates = new TileObjectAlternatesModule(null);
     this._hasOwnAlternates = true;
     this.Alternates = new List<TileObjectData>();
     this._anchor = new AnchorDataModule(null);
     this._hasOwnAnchor = true;
     this.AnchorTop = default(AnchorData);
     this.AnchorBottom = default(AnchorData);
     this.AnchorLeft = default(AnchorData);
     this.AnchorRight = default(AnchorData);
     this.AnchorWall = false;
     this._anchorTiles = new AnchorTypesModule(null);
     this._hasOwnAnchorTiles = true;
     this.AnchorValidTiles = null;
     this.AnchorInvalidTiles = null;
     this.AnchorAlternateTiles = null;
     this.AnchorValidWalls = null;
     this._liquidDeath = new LiquidDeathModule(null);
     this._hasOwnLiquidDeath = true;
     this.WaterDeath = false;
     this.LavaDeath = false;
     this._liquidPlacement = new LiquidPlacementModule(null);
     this._hasOwnLiquidPlacement = true;
     this.WaterPlacement = LiquidPlacement.Allowed;
     this.LavaPlacement = LiquidPlacement.NotAllowed;
     this._placementHooks = new TilePlacementHooksModule(null);
     this._hasOwnPlacementHooks = true;
     this.HookCheck = default(PlacementHook);
     this.HookPostPlaceEveryone = default(PlacementHook);
     this.HookPostPlaceMyPlayer = default(PlacementHook);
     this.HookPlaceOverride = default(PlacementHook);
     this.SubTiles = new List<TileObjectData>(419);
     this._tileObjectBase = new TileObjectBaseModule(null);
     this._hasOwnTileObjectBase = true;
     this.Width = 1;
     this.Height = 1;
     this.Origin = Point16.Zero;
     this.Direction = TileObjectDirection.None;
     this.RandomStyleRange = 0;
     this.FlattenAnchors = false;
     this._tileObjectCoords = new TileObjectCoordinatesModule(null, null);
     this._hasOwnTileObjectCoords = true;
     this.CoordinateHeights = new int[]
     {
         16
     };
     this.CoordinateWidth = 0;
     this.CoordinatePadding = 0;
     this.CoordinatePaddingFix = Point16.Zero;
     this._tileObjectDraw = new TileObjectDrawModule(null);
     this._hasOwnTileObjectDraw = true;
     this.DrawYOffset = 0;
     this.DrawFlipHorizontal = false;
     this.DrawFlipVertical = false;
     this.DrawStepDown = 0;
     this._tileObjectStyle = new TileObjectStyleModule(null);
     this._hasOwnTileObjectStyle = true;
     this.Style = 0;
     this.StyleHorizontal = false;
     this.StyleWrapLimit = 0;
     this.StyleMultiplier = 1;
 }
Exemple #7
0
 public void FullCopyFrom(TileObjectData copy)
 {
     if (copy == null)
     {
         return;
     }
     this._usesCustomCanPlace = copy._usesCustomCanPlace;
     this._alternates = copy._alternates;
     this._anchor = copy._anchor;
     this._anchorTiles = copy._anchorTiles;
     this._tileObjectBase = copy._tileObjectBase;
     this._liquidDeath = copy._liquidDeath;
     this._liquidPlacement = copy._liquidPlacement;
     this._placementHooks = copy._placementHooks;
     this._tileObjectDraw = copy._tileObjectDraw;
     this._tileObjectStyle = copy._tileObjectStyle;
     this._tileObjectCoords = copy._tileObjectCoords;
     this._subTiles = new TileObjectSubTilesModule(copy._subTiles, null);
     this._hasOwnSubTiles = true;
 }
Exemple #8
0
 public void CopyFrom(TileObjectData copy)
 {
     if (copy == null)
     {
         return;
     }
     this._usesCustomCanPlace = copy._usesCustomCanPlace;
     this._alternates = copy._alternates;
     this._anchor = copy._anchor;
     this._anchorTiles = copy._anchorTiles;
     this._tileObjectBase = copy._tileObjectBase;
     this._liquidDeath = copy._liquidDeath;
     this._liquidPlacement = copy._liquidPlacement;
     this._placementHooks = copy._placementHooks;
     this._tileObjectDraw = copy._tileObjectDraw;
     this._tileObjectStyle = copy._tileObjectStyle;
     this._tileObjectCoords = copy._tileObjectCoords;
 }
Exemple #9
0
 public TileObjectData(TileObjectData copyFrom = null)
 {
     this._parent = (TileObjectData)null;
     this._linkedAlternates = false;
     if (copyFrom == null)
     {
         this._usesCustomCanPlace = false;
         this._alternates = (TileObjectAlternatesModule)null;
         this._anchor = (AnchorDataModule)null;
         this._anchorTiles = (AnchorTypesModule)null;
         this._tileObjectBase = (TileObjectBaseModule)null;
         this._liquidDeath = (LiquidDeathModule)null;
         this._liquidPlacement = (LiquidPlacementModule)null;
         this._placementHooks = (TilePlacementHooksModule)null;
         this._tileObjectDraw = (TileObjectDrawModule)null;
         this._tileObjectStyle = (TileObjectStyleModule)null;
         this._tileObjectCoords = (TileObjectCoordinatesModule)null;
     }
     else
         this.CopyFrom(copyFrom);
 }