Definition at line 45834 of file NPC.cs.
45835 {
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45884 float num2 = 0.085f;
45889 {
45890 if (!Collision.CanHit(
this, Main.player[
target]))
45891 {
45894 for (int i = 0; i < 16; i++)
45895 {
45896 float num4 = 16 * i;
45897 Point point = (
center +
new Vector2(0
f, 0
f -
num4)).ToTileCoordinates();
45898 if (
WorldGen.SolidOrSlopedTile(point.X, point.Y))
45899 {
45902 break;
45903 }
45904 }
45906 {
45908 }
45909 }
45910 else
45911 {
45913 }
45914 }
45915 else
45916 {
45918 }
45921 {
45923 }
45926 {
45928 }
45930 {
45932 }
45933 else if (
num5 < 80
f)
45934 {
45937 }
45938 else
45939 {
45942 }
45946 {
45948 }
45950 {
45952 }
45953 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
void TargetClosest(bool faceTarget=true)
bool noGravity
If true, the npc will not be affected by gravity. Demon Eyes and other floating npc use this....
bool noTileCollide
If true, the npc does not collide with tiles, making the npc pass through tiles freely....
void SimpleFlyMovement(Vector2 desiredVelocity, float moveSpeed)
References Terraria.Collision.CanHit(), Terraria.Entity.direction, Terraria.NPC.noGravity, Terraria.NPC.noTileCollide, Terraria.Main.player, Terraria.NPC.rotation, Terraria.NPC.SimpleFlyMovement(), Terraria.WorldGen.SolidOrSlopedTile(), Terraria.NPC.target, Terraria.NPC.TargetClosest(), Terraria.NPC.timeLeft, and Terraria.Entity.velocity.
Referenced by Terraria.NPC.AI_121_QueenSlime().