44009 {
44010
44011
44012
44013
44014
44015
44016
44017
44018
44019
44020
44021
44022
44023
44024 if (
localAI[0] == 0
f && Main.netMode != 1)
44025 {
44029 }
44033 float num =
float.PositiveInfinity;
44035 Vector2
zero = Vector2.Zero;
44037 {
44038 zero = targetData.Center -
base.Bottom;
44040 {
44042 }
44045 {
44047 }
44048 }
44050 {
44052 position.X -=
num3;
44061 return;
44062 }
44064 {
44065 velocity.Y = ((oldVelocity.Y > 0
f) ? 1 : (-1));
44067 }
44068 float num4 = 3
f +
Math.Abs(Main.windSpeedTarget) * 2
f;
44070 {
44073 {
44075 {
44077 }
44078 else
44079 {
44081 }
44082 }
44084 {
44086 }
44087 }
44092 bool flag2 =
false;
44094 {
44095 if (Main.tile[
num5, i] ==
null)
44096 {
44097 Main.tile[
num5, i] =
default(
Tile);
44098 }
44099 if ((Main.tile[
num5, i].nactive() && Main.tileSolid[Main.tile[
num5, i].type]) || Main.tile[
num5, i].liquid > 0)
44100 {
44102 {
44104 }
44106 break;
44107 }
44108 }
44110 {
44112 float num9 = 0.035f;
44114 {
44115 velocity.Y -=
num9;
44117 {
44118 velocity.Y -=
num9;
44119 }
44120 }
44122 {
44123 velocity.Y +=
num9;
44125 {
44126 velocity.Y +=
num9;
44127 }
44128 }
44129 }
44130 else
44131 {
44133 {
44134 velocity.Y += 0.05f;
44135 }
44136 else
44137 {
44138 velocity.Y -= 0.1f;
44139 }
44141 {
44142 velocity.Y -= 0.2f;
44143 }
44145 {
44147 }
44149 {
44151 }
44152 }
44153 }
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 ...
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
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.
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
int height
The height of this Entity's hitbox, in pixels.
float[] localAI
Acts like F:Terraria.NPC.ai, but does not sync to the server. Many vanilla T:Terraria....
void TargetClosest(bool faceTarget=true)
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)
int life
The current life of the NPC. Automatically set to the value of F:Terraria.NPC.lifeMax at the end of S...
SoundStyle? DeathSound
The sound that plays when this npc dies. Set this to an existing T:Terraria.ID.SoundID entry or assig...
void HitEffect(int hitDirection=0, double dmg=10.0, bool? instantKill=null)