TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ SimpleFlyMovement()

void Terraria.NPC.SimpleFlyMovement ( Vector2 desiredVelocity,
float moveSpeed )
inline

Definition at line 82824 of file NPC.cs.

82825 {
82826 //IL_000b: Unknown result type (might be due to invalid IL or missing references)
82827 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
82828 //IL_00b1: Unknown result type (might be due to invalid IL or missing references)
82829 //IL_0035: Unknown result type (might be due to invalid IL or missing references)
82830 //IL_0104: Unknown result type (might be due to invalid IL or missing references)
82831 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
82832 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
82833 //IL_012e: Unknown result type (might be due to invalid IL or missing references)
82834 if (velocity.X < desiredVelocity.X)
82835 {
82836 velocity.X += moveSpeed;
82837 if (velocity.X < 0f && desiredVelocity.X > 0f)
82838 {
82839 velocity.X += moveSpeed;
82840 }
82841 }
82842 else if (velocity.X > desiredVelocity.X)
82843 {
82844 velocity.X -= moveSpeed;
82845 if (velocity.X > 0f && desiredVelocity.X < 0f)
82846 {
82847 velocity.X -= moveSpeed;
82848 }
82849 }
82850 if (velocity.Y < desiredVelocity.Y)
82851 {
82852 velocity.Y += moveSpeed;
82853 if (velocity.Y < 0f && desiredVelocity.Y > 0f)
82854 {
82855 velocity.Y += moveSpeed;
82856 }
82857 }
82858 else if (velocity.Y > desiredVelocity.Y)
82859 {
82860 velocity.Y -= moveSpeed;
82861 if (velocity.Y > 0f && desiredVelocity.Y < 0f)
82862 {
82863 velocity.Y -= moveSpeed;
82864 }
82865 }
82866 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33

References Terraria.Entity.velocity.

Referenced by Terraria.NPC.AI_069_DukeFishron(), Terraria.NPC.AI_110_Betsy(), Terraria.NPC.AI_117_BloodNautilus(), Terraria.NPC.AI_120_HallowBoss(), Terraria.NPC.AI_121_QueenSlime_FlyMovement(), and Terraria.NPC.VanillaAI_Inner().

+ Here is the caller graph for this function: