56770 {
56771
56772
56773
56774
56775
56776
56777
56778
56779
56780
56781
56782
56783
56784
56785
56786
56787
56788
56789
56790
56791
56792
56793
56794
56795
56796
56797
56798
56799
56800
56801
56802
56803
56804
56805
56806
56807
56808
56809
56810
56813 for (int i = 0; i < 1000; i++)
56814 {
56815 if (i !=
whoAmI && Main.projectile[i].active && Main.projectile[i].type ==
type &&
Math.Abs(
position.X - Main.projectile[i].position.X) +
Math.Abs(
position.Y - Main.projectile[i].position.Y) <
num2)
56816 {
56817 if (
position.X < Main.projectile[i].position.X)
56818 {
56820 }
56821 else
56822 {
56824 }
56825 if (
position.Y < Main.projectile[i].position.Y)
56826 {
56828 }
56829 else
56830 {
56832 }
56833 }
56834 }
56836 {
56837 velocity.X *= 0.9f;
56840 _ = position.Y / 16
f;
56842 if (Main.tile[
num3,
num4] ==
null)
56843 {
56845 }
56846 if (Main.tile[
num3,
num5] ==
null)
56847 {
56849 }
56851 {
56852 velocity.Y *= 0.5f;
56853 }
56858 {
56859 velocity.Y -= 0.1f;
56861 {
56863 }
56865 {
56866 velocity.Y =
num6 -
base.Center.Y;
56867 }
56868 }
56869 else
56870 {
56871 velocity.Y =
num6 -
base.Center.Y;
56872 }
56873 }
56874 else
56875 {
56877 {
56878 velocity.X *= 0.95f;
56879 }
56880 velocity.X *= 0.98f;
56881 velocity.Y += 0.3f;
56883 {
56884 velocity.Y = 15.9f;
56885 }
56886 }
56888 {
56890 frame = Main.rand.Next(4);
56891 }
56893 {
56896 {
56897 Gore gore = Gore.NewGoreDirect(
position + Vector2.UnitY * 6
f, Vector2.Zero, 1201,
scale * 0.7f);
56898 gore.velocity = Main.rand.NextVector2CircularEdge(10
f, 10
f);
56899 if (gore.velocity.Y > 0
f)
56900 {
56901 gore.velocity.Y *= -1
f;
56902 }
56903 }
56905 {
56906 Gore
gore2 = Gore.NewGoreDirect(
position + Vector2.UnitY * 6
f, Vector2.Zero, 1208,
scale * 0.7f + Main.rand.NextFloat() * 0.15f);
56907 gore2.velocity = Main.rand.NextVector2CircularEdge(4
f, 4
f);
56908 if (
gore2.velocity.Y > 0
f)
56909 {
56910 gore2.velocity.Y *= -1
f;
56911 }
56912 }
56913 }
56919 {
56920 Gore
gore3 = Gore.NewGoreDirect(
position + Vector2.UnitY * 6
f, Vector2.Zero, 1201,
scale * 0.7f);
56922 {
56923 gore3.velocity = Vector2.UnitX * Main.rand.NextFloatDirection() * 0.75f + Vector2.UnitY * Main.rand.NextFloat();
56924 }
56925 else if (
gore3.velocity.Y < 0
f)
56926 {
56927 gore3.velocity.Y = 0
f -
gore3.velocity.Y;
56928 }
56929 }
56930 Vector2
spot = base.Center + Vector2.UnitY * 16
f;
56932 {
56935 }
56937 {
56938 Main.instance.ChumBucketProjectileHelper.AddChumLocation(
spot);
56939 }
56940 }
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
float AI_061_FishingBobber_GetWaterLine(int X, int Y)
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 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....