43484 {
43485
43486
43487
43488
43489
43490
43491
43492
43493
43494
43495
43496
43497
43498
43499
43500
43501
43502
43503
43504
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534
43535
43536
43537
43538
43539
43540
43541
43542
43543
43544
43545
43546
43547
43549 {
43552 }
43553 alpha = (int)(255
f * (1
f - Utils.Remap(
ai[0], 0
f, 2
f, 0
f, 1
f) * Utils.Remap(
ai[0], 6
f, 10
f, 1
f, 0
f)));
43559 {
43562 {
43564 return;
43565 }
43566 }
43569 {
43570 for (int i = 0; i < 20; i++)
43571 {
43572 int num3 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
43573 Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
num,
num2),
num3,
velocity.RotatedBy(Main.rand.NextFloatDirection() * ((
float)
Math.PI / 4
f) * 0.6f) * (2
f + 5
f * Main.rand.NextFloat()), 200,
default(Color), 1
f + Main.rand.NextFloat()).customData = 0;
43574 }
43575 int num4 = Main.rand.Next(3, 7);
43576 for (
int j = 0;
j <
num4 * 5;
j++)
43577 {
43578 Dust
dust3 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
num,
num2), 31,
velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)
Math.PI / 4
f) * 0.6f) * (2
f + 5
f * Main.rand.NextFloat()), 50,
default(Color), 1
f + Main.rand.NextFloat());
43579 dust3.noGravity = true;
43580 dust3.velocity *= 3
f;
43581 }
43582 for (
int k = 0;
k <
num4;
k++)
43583 {
43584 Gore.NewGorePerfect(
base.Center + Main.rand.NextVector2Circular(
num,
num2) -
new Vector2(16
f, 16
f),
velocity.RotatedBy(Main.rand.NextFloatDirection() * ((
float)
Math.PI / 4
f) * 0.6f) * (0
f + 4
f * Main.rand.NextFloat()), 61 + Main.rand.Next(3));
43585 }
43586 }
43587 for (
int l = 0;
l < 2;
l++)
43588 {
43589 if (Main.rand.Next(3) < 2)
43590 {
43591 Dust
dust2 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
num,
num2), 6,
velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)
Math.PI / 4
f)) * (1.5
f + 2
f * Main.rand.NextFloat()), 90,
default(Color), 2.5f);
43592 dust2.noGravity = true;
43594 if (Main.rand.Next(6) < 3)
43595 {
43596 dust2.noGravity = false;
43597 dust2.noLight = true;
43598 dust2.fadeIn = 0.4f;
43599 dust2.scale *= 0.3f;
43600 }
43601 else
43602 {
43604 }
43605 dust2.customData = 0;
43606 }
43607 }
43608 for (
int m = 0;
m < 2;
m++)
43609 {
43610 if (!(Main.rand.NextFloat() < 0.5f))
43611 {
43612 int num5 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
43613 Dust
dust4 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
num,
num2),
num5,
velocity.RotatedBy(Main.rand.NextFloatDirection() * ((float)
Math.PI / 4
f) * 0.5f) * (1
f + 2
f * Main.rand.NextFloat()), 200,
default(Color), 1
f + Main.rand.NextFloat());
43614 dust4.velocity *=
new Vector2(0.6
f, 1.5
f);
43615 dust4.customData = 0;
43616 }
43617 }
43618 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 DirectionFrom(Vector2 Source)
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle DD2_ExplosiveTrapExplode
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....