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

◆ paintCoatEffect()

static void Terraria.WorldGen.paintCoatEffect ( int x,
int y,
byte paintCoatId,
List< Color > oldColors )
inlinestatic

Definition at line 35239 of file WorldGen.cs.

35240 {
35242 for (int i = 0; i < 10; i++)
35243 {
35244 Color newColor = color;
35245 if (paintCoatId == 0 && oldColors.Count > 0)
35246 {
35247 newColor = oldColors[Main.rand.Next(oldColors.Count)];
35248 }
35249 int num = Dust.NewDust(new Vector2(x * 16, y * 16), 16, 16, 143, 0f, 0f, 50, newColor);
35250 if (genRand.Next(2) == 0)
35251 {
35252 Main.dust[num].noGravity = true;
35253 Main.dust[num].scale *= 1.2f;
35254 }
35255 else
35256 {
35257 Main.dust[num].scale *= 0.5f;
35258 }
35259 }
35260 }
static Color coatingColor(int coating)
static UnifiedRandom genRand
Definition WorldGen.cs:1215

References System.Collections.Generic.Dictionary< TKey, TValue >.Count, Terraria.Main.dust, Terraria.Dust.NewDust(), and Terraria.Main.rand.