48 {
50 {
51 if (Main.rand.Next(3) == 0)
52 {
53 if (Main.rand.Next(2) == 0)
54 {
57 Dust dust = Dust.NewDustDirect(
_position -
vector * 30f, 0, 0, Utils.SelectRandom<
int>(Main.rand, 86, 88));
58 dust.noGravity = true;
59 dust.noLightEmittence = true;
61 dust.velocity =
vector.RotatedBy(1.5707963705062866) * 2f;
62 dust.scale = 0.5f + Main.rand.NextFloat();
63 dust.fadeIn = 0.5f;
64 dust.customData = this;
65 dust.position += dust.velocity * 10f;
66 dust.velocity *= -1f;
67 }
68 else
69 {
73 dust2.noGravity = true;
74 dust2.noLight = true;
76 dust2.velocity =
vector2.RotatedBy(-1.5707963705062866) * 3f;
77 dust2.scale = 0.5f + Main.rand.NextFloat();
78 dust2.fadeIn = 0.5f;
79 dust2.customData = this;
80 dust2.position += dust2.velocity * 10f;
81 dust2.velocity *= -1f;
82 }
83 }
84 }
85 else if (Main.rand.Next(3) == 0)
86 {
87 if (Main.rand.Next(2) == 0)
88 {
91 Dust
dust3 = Dust.NewDustDirect(
_position -
vector3 * 30f, 0, 0, Utils.SelectRandom<
int>(Main.rand, 86, 88));
92 dust3.noGravity = true;
93 dust3.noLightEmittence = true;
95 dust3.velocity =
vector3.RotatedBy(-0.7853981852531433) * 2f;
96 dust3.scale = 0.5f + Main.rand.NextFloat();
97 dust3.fadeIn = 0.5f;
98 dust3.customData = this;
100 }
101 else
102 {
105 Dust
dust4 = Dust.NewDustDirect(
_position -
vector4 * 30f, 0, 0, Utils.SelectRandom<
int>(Main.rand, 86, 88));
106 dust4.noGravity = true;
107 dust4.noLightEmittence = true;
109 dust4.velocity =
vector4.RotatedBy(-0.7853981852531433) * 2f;
110 dust4.scale = 0.5f + Main.rand.NextFloat();
111 dust4.fadeIn = 0.5f;
112 dust4.customData = this;
114 }
115 }
116 }
readonly GateType _gateType
readonly Vector2 _position