using System; using Microsoft.Xna.Framework; using Terraria; namespace Decimation.Lib.Util { public class DustUtils { public static void NewDustCircle(int amount, Vector2 position, int width, int height, int type, float scale = 1f, float speedX = 0f, float speedY = 0f, bool gravity = false, int alpha = 0, Color color = default) { for (int i = 0; i < amount; i++) { Vector2 velocity = new Vector2(speedX, speedY).RotatedBy(Math.PI * (2f / amount * i)); int dust = Dust.NewDust(position, width, height, type, velocity.X, velocity.Y, alpha, color, scale); Main.dust[dust].noGravity = !gravity; } } } }