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

◆ TrySparkling()

static void Terraria.WaterfallManager.TrySparkling ( int x,
int y,
int direction,
Color aColor2 )
inlinestaticprivate

Definition at line 1140 of file WaterfallManager.cs.

1141 {
1142 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
1143 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
1144 //IL_00af: Unknown result type (might be due to invalid IL or missing references)
1145 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
1146 //IL_00be: Unknown result type (might be due to invalid IL or missing references)
1147 if (((Color)(ref aColor2)).R > 20 || ((Color)(ref aColor2)).B > 20 || ((Color)(ref aColor2)).G > 20)
1148 {
1149 float num = (int)((Color)(ref aColor2)).R;
1150 if ((float)(int)((Color)(ref aColor2)).G > num)
1151 {
1152 num = (int)((Color)(ref aColor2)).G;
1153 }
1154 if ((float)(int)((Color)(ref aColor2)).B > num)
1155 {
1156 num = (int)((Color)(ref aColor2)).B;
1157 }
1158 if ((float)Main.rand.Next(20000) < num / 30f)
1159 {
1160 int num2 = Dust.NewDust(new Vector2((float)(x * 16 - direction * 7), (float)(y * 16 + 6)), 10, 8, 43, 0f, 0f, 254, Color.White, 0.5f);
1161 Dust obj = Main.dust[num2];
1162 obj.velocity *= 0f;
1163 }
1164 }
1165 }

References Terraria.Main.dust, Terraria.Dust.NewDust(), and Terraria.Main.rand.

Referenced by Terraria.WaterfallManager.DrawWaterfall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: