51413 {
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51485 Vector2
vector = player.RotatedRelativePoint(player.MountedCenter);
51488 if (player.CCed || player.noItems)
51489 {
51491 }
51492 else if (player.inventory[player.selectedItem].shoot !=
type)
51493 {
51495 }
51496 else if (player.pulley)
51497 {
51499 }
51500 else if (player.dead)
51501 {
51503 }
51505 {
51506 Vector2
val = player.Center -
base.Center;
51508 }
51510 {
51512 return;
51513 }
51518 {
51521 {
51523 }
51525 if (Main.mouseRight)
51526 {
51528 }
51529 if (Main.mouseLeft)
51530 {
51532 }
51535 {
51537 }
51538 }
51540 {
51542 }
51544 float cloudAlpha = Main.cloudAlpha;
51547 {
51548 num11 = Main.WindForVisuals;
51549 }
51552 {
51553 case 0:
51554 {
51557 mouseWorld +=
new Vector2(
num11, (
float)
Math.Sin(Main.GlobalTimeWrappedHourly) + cloudAlpha * 5
f) * 25
f;
51559 v = v.SafeNormalize(Vector2.Zero) * (3
f + cloudAlpha * 7
f);
51561 {
51563 }
51568 {
51570 }
51571 velocity.Y = y;
51572 velocity.Y -=
num12;
51573 velocity.Y += 0.02f +
num12 * 0.25f;
51576 {
51578 }
51579 velocity.X *= 0.98f;
51583 {
51588 velocity.Y += vector3.Y * 0.05f;
51590 {
51591 velocity.Y -= 0.15f;
51592 }
51593 velocity.X += vector3.X * 0.2f;
51595 {
51597 return;
51598 }
51599 }
51600 break;
51601 }
51602 case 1:
51603 {
51607 {
51609 return;
51610 }
51611 break;
51612 }
51613 }
51616 int dir = ((vector4.X > 0
f) ? 1 : (-1));
51618 {
51619 player.ChangeDir(
dir);
51620 }
51623 {
51625 }
51626 else
51627 {
51630 {
51631 num5 -= (float)
Math.PI / 2
f * (
float)player.direction;
51632 }
51634 }
51637 {
51638 case 771:
51639 case 822:
51640 case 823:
51641 case 827:
51642 case 830:
51643 case 838:
51644 case 843:
51645 case 844:
51646 case 845:
51647 case 846:
51648 case 850:
51649 case 852:
51651 break;
51652 case 828:
51653 case 829:
51655 {
51657 }
51658 else
51659 {
51661 }
51662 break;
51663 case 826:
51665 break;
51666 case 824:
51667 case 839:
51668 case 840:
51669 case 853:
51671 {
51673 break;
51674 }
51677 {
51679 frame = Main.rand.Next(4);
51680 }
51681 break;
51682 default:
51684 {
51686 }
51687 else if (
num6 < 5
f)
51688 {
51690 }
51691 else if (
num6 < 7
f)
51692 {
51694 }
51695 else
51696 {
51698 }
51699 break;
51700 }
51702 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
float Distance(Vector2 Other)
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
Vector2 DirectionTo(Vector2 Destination)
int height
The height of this Entity's hitbox, in pixels.
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int extraUpdates
Additional update steps per tick. Useful for really fast projectiles such as Shadowbeam Staff....
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.