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