248 {
249 Rectangle rectangle = Utils.CenteredRectangle(settings.PositionInWorld,
new Vector2(30f, 60f));
250 for (float num = 0f; num < 20f; num += 1f)
251 {
253 int num2 = Main.rand.Next(20, 40);
254 prettySparkleParticle.ColorTint = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f, 0);
255 prettySparkleParticle.LocalPosition = Main.rand.NextVector2FromRectangle(rectangle);
256 prettySparkleParticle.Rotation = (float)
Math.
PI / 2f;
257 prettySparkleParticle.Scale =
new Vector2(1f + Main.rand.NextFloat() * 2f, 0.7f + Main.rand.NextFloat() * 0.7f);
258 prettySparkleParticle.Velocity =
new Vector2(0f, -1f);
259 prettySparkleParticle.FadeInNormalizedTime = 5
E-06f;
260 prettySparkleParticle.FadeOutNormalizedTime = 0.95f;
261 prettySparkleParticle.TimeToLive = num2;
262 prettySparkleParticle.FadeOutEnd = num2;
263 prettySparkleParticle.FadeInEnd = num2 / 2;
264 prettySparkleParticle.FadeOutStart = num2 / 2;
265 prettySparkleParticle.AdditiveAmount = 0.35f;
266 prettySparkleParticle.DrawVerticalAxis = false;
267 Main.ParticleSystem_World_OverPlayers.Add(prettySparkleParticle);
269 prettySparkleParticle2.ColorTint =
new Color(255, 255, 255, 0);
270 prettySparkleParticle2.LocalPosition = Main.rand.NextVector2FromRectangle(rectangle);
271 prettySparkleParticle2.Rotation = (float)
Math.
PI / 2f;
272 prettySparkleParticle2.Scale = prettySparkleParticle.Scale * 0.5f;
273 prettySparkleParticle2.Velocity =
new Vector2(0f, -1f);
274 prettySparkleParticle2.FadeInNormalizedTime = 5
E-06f;
275 prettySparkleParticle2.FadeOutNormalizedTime = 0.95f;
276 prettySparkleParticle2.TimeToLive = num2;
277 prettySparkleParticle2.FadeOutEnd = num2;
278 prettySparkleParticle2.FadeInEnd = num2 / 2;
279 prettySparkleParticle2.FadeOutStart = num2 / 2;
280 prettySparkleParticle2.AdditiveAmount = 1f;
281 prettySparkleParticle2.DrawVerticalAxis = false;
282 Main.ParticleSystem_World_OverPlayers.Add(prettySparkleParticle2);
283 }
284 for (
int i = 0;
i < 20;
i++)
285 {
286 int num3 = Dust.NewDust(rectangle.TopLeft(), rectangle.
Width, rectangle.
Height, 308);
287 Main.dust[num3].velocity.Y -= 8f;
288 Main.dust[num3].velocity.X *= 0.5f;
289 Main.dust[num3].scale = 0.8f;
290 Main.dust[num3].noGravity = true;
291 switch (Main.rand.Next(6))
292 {
293 case 0:
294 Main.dust[num3].color =
new Color(255, 255, 210);
295 break;
296 case 1:
297 Main.dust[num3].color =
new Color(190, 245, 255);
298 break;
299 case 2:
300 Main.dust[num3].color =
new Color(255, 150, 255);
301 break;
302 default:
303 Main.dust[num3].color =
new Color(190, 175, 255);
304 break;
305 }
306 }
308 }
static void PlaySound(int type, Vector2 position, int style=1)
static ParticlePool< PrettySparkleParticle > _poolPrettySparkle
static readonly LegacySoundStyle Item29