Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PortalHelper()

static Terraria.GameContent.PortalHelper.PortalHelper ( )
inlinestaticprivate

Definition at line 26 of file PortalHelper.cs.

27 {
28 FoundPortals = new int[256, 2];
29 PortalCooldownForPlayers = new int[256];
30 PortalCooldownForNPCs = new int[200];
31 EDGES = new Vector2[4]
32 {
33 new Vector2(0f, 1f),
34 new Vector2(0f, -1f),
35 new Vector2(1f, 0f),
36 new Vector2(-1f, 0f)
37 };
38 SLOPE_EDGES = new Vector2[4]
39 {
40 new Vector2(1f, -1f),
41 new Vector2(-1f, -1f),
42 new Vector2(1f, 1f),
43 new Vector2(-1f, 1f)
44 };
45 SLOPE_OFFSETS = new Point[4]
46 {
47 new Point(1, -1),
48 new Point(-1, -1),
49 new Point(1, 1),
50 new Point(-1, 1)
51 };
52 anyPortalAtAll = false;
53 for (int i = 0; i < SLOPE_EDGES.Length; i++)
54 {
55 SLOPE_EDGES[i].Normalize();
56 }
57 for (int j = 0; j < FoundPortals.GetLength(0); j++)
58 {
59 FoundPortals[j, 0] = -1;
60 FoundPortals[j, 1] = -1;
61 }
62 }
static readonly Point[] SLOPE_OFFSETS
static readonly Vector2[] EDGES
static readonly Vector2[] SLOPE_EDGES

References Terraria.GameContent.PortalHelper.anyPortalAtAll, Terraria.GameContent.PortalHelper.EDGES, Terraria.GameContent.PortalHelper.FoundPortals, Terraria.GameContent.PortalHelper.PortalCooldownForNPCs, Terraria.GameContent.PortalHelper.PortalCooldownForPlayers, Terraria.GameContent.PortalHelper.SLOPE_EDGES, and Terraria.GameContent.PortalHelper.SLOPE_OFFSETS.