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

◆ IsGolfBallResting()

static bool Terraria.GameContent.Golf.GolfHelper.IsGolfBallResting ( Projectile golfBall)
inlinestatic

Definition at line 417 of file GolfHelper.cs.

418 {
419 if ((int)golfBall.localAI[1] != 0)
420 {
421 return Vector2.Distance(golfBall.position, golfBall.oldPos[golfBall.oldPos.Length - 1]) < 1f;
422 }
423 return true;
424 }
static float Distance(Vector2 value1, Vector2 value2)
Definition Vector2.cs:91

References Microsoft.Xna.Framework.Vector2.Distance(), Microsoft.Xna.Framework.Vector2.Length(), Terraria.Projectile.localAI, Terraria.Projectile.oldPos, and Terraria.Entity.position.

Referenced by Terraria.Main.DrawInterface_GolfBallIndicator(), and Terraria.Main.DrawProjDirect().