Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TileObjectCoordinatesModule.cs
Go to the documentation of this file.
1using System;
3
4namespace Terraria.Modules;
5
7{
8 public int width;
9
10 public int[] heights;
11
12 public int padding;
13
15
16 public int styleWidth;
17
18 public int styleHeight;
19
20 public bool calculated;
21
22 public int drawStyleOffset;
23
24 public TileObjectCoordinatesModule(TileObjectCoordinatesModule copyFrom = null, int[] drawHeight = null)
25 {
26 if (copyFrom == null)
27 {
28 width = 0;
29 padding = 0;
31 styleWidth = 0;
33 styleHeight = 0;
34 calculated = false;
35 heights = drawHeight;
36 return;
37 }
38 width = copyFrom.width;
39 padding = copyFrom.padding;
40 paddingFix = copyFrom.paddingFix;
41 drawStyleOffset = copyFrom.drawStyleOffset;
42 styleWidth = copyFrom.styleWidth;
43 styleHeight = copyFrom.styleHeight;
44 calculated = copyFrom.calculated;
45 if (drawHeight == null)
46 {
47 if (copyFrom.heights == null)
48 {
49 heights = null;
50 return;
51 }
52 heights = new int[copyFrom.heights.Length];
53 Array.Copy(copyFrom.heights, heights, heights.Length);
54 }
55 else
56 {
57 heights = drawHeight;
58 }
59 }
60}
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
Definition Array.cs:624
TileObjectCoordinatesModule(TileObjectCoordinatesModule copyFrom=null, int[] drawHeight=null)