42517 {
42518
42519
42520
42521
42522
42523
42524
42525
42526
42527
42528
42529 int[] array = new int[20];
42535 for (int i = 0; i < 200; i++)
42536 {
42537 if (!Main.npc[i].CanBeChasedBy(this))
42538 {
42539 continue;
42540 }
42541 float num6 = Main.npc[i].position.X + (float)(Main.npc[i].width / 2);
42542 float num7 = Main.npc[i].position.Y + (float)(Main.npc[i].height / 2);
42544 {
42546 {
42551 }
42553 }
42554 }
42556 {
42558 }
42560 {
42561 int num8 = Main.rand.Next(
num);
42563 num4 = Main.npc[
num8].position.X + (float)(Main.npc[
num8].width / 2);
42564 num5 = Main.npc[
num8].position.Y + (float)(Main.npc[
num8].height / 2);
42567 {
42569 Vector2
vector =
default(Vector2);
42579 }
42580 }
42581 }
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...
IEntitySource GetProjectileSource_FromThis()
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
float knockBack
This will always be set in Projectile.NewProjectile based on the weapons knockback and player stat mo...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
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...