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

◆ QuickBox()

static void Terraria.Dust.QuickBox ( Vector2 topLeft,
Vector2 bottomRight,
int divisions,
Color color,
Action< Dust > manipulator )
inlinestatic

Definition at line 273 of file Dust.cs.

274 {
275 float num = divisions + 2;
276 for (float num2 = 0f; num2 <= (float)(divisions + 2); num2 += 1f)
277 {
278 Dust obj = QuickDust(new Vector2(MathHelper.Lerp(topLeft.X, bottomRight.X, num2 / num), topLeft.Y), color);
279 manipulator?.Invoke(obj);
280 obj = QuickDust(new Vector2(MathHelper.Lerp(topLeft.X, bottomRight.X, num2 / num), bottomRight.Y), color);
281 manipulator?.Invoke(obj);
282 obj = QuickDust(new Vector2(topLeft.X, MathHelper.Lerp(topLeft.Y, bottomRight.Y, num2 / num)), color);
283 manipulator?.Invoke(obj);
284 obj = QuickDust(new Vector2(bottomRight.X, MathHelper.Lerp(topLeft.Y, bottomRight.Y, num2 / num)), color);
285 manipulator?.Invoke(obj);
286 }
287 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
Color color
Definition Dust.cs:40
static Dust QuickDust(int x, int y, Color color)
Definition Dust.cs:263

References Terraria.Dust.color, Microsoft.Xna.Framework.MathHelper.Lerp(), System.obj, Terraria.Dust.QuickDust(), Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.

Referenced by Terraria.StrayMethods.SendWalker().