76837 {
76838
76839
76840
76841
76842
76843
76844
76845
76846
76847
76848
76849
76850
76851
76852
76853
76854
76855
76856
76857
76858
76859
76860
76861
76862
76863
76864
76865
76866
76867
76868
76869
76870
76871
76872
76873
76874
76875
76876
76877
76878
76879
76880
76881
76882
76883
76884
76885
76886
76887
76888
76889
76890
76891
76892
76893
76894
76895
76896
76897
76898
76899
76900
76901
76902
76903
76904
76905
76906
76907
76908
76909
76910
76911
76912
76913
76914
76915
76916
76917
76918
76919
76920
76921
76922
76923
76924
76925
76926
76927
76928
76929
76930
76931
76932
76933
76934
76935
76936
76937
76938
76939
76940
76941
76942
76943
76944
76945
76946
76947
76948
76949
76950
76951
76952
76953
76954
76955
76956
76957
76958
76959
76960
76961
76962
76963
76964
76965
76966
76967
76968
76969
76970
76971
76972
76973
76974
76975
76976
76977
76978
76979
76980
76981
76982
76983
76984
76985
76986
76987
76988
76989
76990
76991
76992
76993
76994
76995
76996
76997
76998
76999
77000
77001
77002
77003
77004
77005
77006
77007
77008
77009
77011 Vector2
vector = player.RotatedRelativePoint(player.MountedCenter);
77013 player.heldProj =
whoAmI;
77015 if (player.dead)
77016 {
77018 return;
77019 }
77020 if (!player.frozen)
77021 {
77023 {
77028 {
77030 }
77032 {
77034 }
77035 float num = (float)player.itemAnimation / (
float)player.itemAnimationMax;
77045 {
77047 }
77052 for (
int i = 0; (float)i <
num10; i++)
77053 {
77054 Dust dust = Dust.NewDustDirect(
base.Center, 14, 14, 228, 0
f, 0
f, 110);
77055 dust.velocity =
vector2.DirectionTo(dust.position) * 2
f;
77056 dust.position = base.Center +
vector4.RotatedBy(
num6 * ((
float)
Math.PI * 2
f) * 2
f + (float)i /
num10 * ((
float)Math.PI * 2
f)) * 10
f;
77057 dust.scale = 1
f + 0.6f * Main.rand.NextFloat();
77059 dust.noGravity = true;
77060 }
77061 for (
int j = 0;
j < 1;
j++)
77062 {
77063 if (Main.rand.Next(3) == 0)
77064 {
77065 Dust
dust2 = Dust.NewDustDirect(
base.Center, 20, 20, 228, 0
f, 0
f, 110);
77067 dust2.position = base.Center +
vector3 * -110
f;
77068 dust2.scale = 0.45f + 0.4f * Main.rand.NextFloat();
77069 dust2.fadeIn = 0.7f + 0.4f * Main.rand.NextFloat();
77070 dust2.noGravity = true;
77071 dust2.noLight = true;
77072 }
77073 }
77074 }
77075 else if (
type == 708)
77076 {
77077 Lighting.AddLight(player.Center, 0.75f, 0.9f, 1.15f);
77081 {
77083 }
77084 float num11 = (float)player.itemAnimation / (
float)player.itemAnimationMax;
77094 {
77096 }
77097 (base.Center -
vector).SafeNormalize(Vector2.Zero);
77100 if ((player.itemAnimation == 2 || player.itemAnimation == 6 || player.itemAnimation == 10) &&
owner == Main.myPlayer)
77101 {
77104 switch (player.itemAnimation)
77105 {
77106 case 2:
77108 break;
77109 case 6:
77111 break;
77112 case 10:
77114 break;
77115 }
77116 vector7 *= 10
f + (float)Main.rand.Next(4);
77118 }
77119 for (
int k = 0;
k < 3;
k += 2)
77120 {
77124 {
77125 case 1:
77127 break;
77128 case 2:
77131 break;
77132 case 3:
77135 break;
77136 }
77137 if (Main.rand.Next(6) != 0)
77138 {
77142 dust3.noGravity = true;
77143 dust3.noLight = true;
77144 dust3.scale = 0.75f;
77145 dust3.fadeIn = 0.8f;
77146 dust3.customData = this;
77147 if (Main.rand.Next(3) == 0)
77148 {
77149 dust3.noGravity = false;
77151 }
77152 }
77153 }
77154 }
77155 }
77156 if (player.whoAmI == Main.myPlayer && player.itemAnimation <= 2)
77157 {
77159 player.reuseDelay = 2;
77160 }
77161 }
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.
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
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...
IEntitySource GetProjectileSource_FromThis()
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...