21118 {
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21171 {
21173 }
21175 {
21179 {
21181 }
21182 }
21184 {
21186 {
21189 }
21190 else if (
type == 976)
21191 {
21193 }
21194 else
21195 {
21198 }
21199 }
21201 {
21203 {
21205 }
21206 else
21207 {
21210 }
21211 }
21213 {
21215 if (Main.rand.Next(8) == 0)
21216 {
21217 Dust dust = Dust.NewDustDirect(
base.Center, 0, 0, 172,
velocity.X * 0.1f,
velocity.Y * 0.1f, 100,
default(Color), 0.9f);
21218 dust.noGravity = true;
21219 dust.position =
base.Center;
21220 dust.velocity = Main.rand.NextVector2Circular(1
f, 1
f) +
velocity * 0.5f;
21221 }
21222 }
21224 {
21226 {
21228 return;
21229 }
21231 {
21234 {
21236 }
21237 }
21244 if (Main.rand.Next(3) == 0)
21245 {
21247 dust2.noGravity = true;
21249 }
21251 {
21253 for (int i = 0; i < 10; i++)
21254 {
21255 Dust.NewDustDirect(
position,
width,
height, 40, 0
f, 0
f, 0,
default(Color), 0.7f).
velocity =
velocity.SafeNormalize(Vector2.UnitY).RotatedBy(Main.rand.NextFloat() * ((float)
Math.PI * 2
f) * 0.25f) * (Main.rand.NextFloat() * 3
f);
21256 }
21257 }
21258 }
21261 }
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 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.
static readonly SoundStyle Item1
static readonly SoundStyle Item9
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...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
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...
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
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.