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

◆ Float()

static void Terraria.DelegateMethods.CharacterPreview.Float ( Projectile proj,
bool walking )
inlinestatic

Definition at line 116 of file DelegateMethods.cs.

117 {
118 float num = 0.5f;
119 float num2 = (float)Main.timeForVisualEffects % 60f / 60f;
120 proj.position.Y += 0f - num + (float)(Math.Cos(num2 * ((float)Math.PI * 2f) * 2f) * (double)(num * 2f));
121 }
static double Cos(double d)
const double PI
Definition Math.cs:16

References System.Math.Cos(), System.Math.PI, and Terraria.Main.timeForVisualEffects.

Referenced by Terraria.DelegateMethods.CharacterPreview.EtsyPet(), Terraria.DelegateMethods.CharacterPreview.FloatAndRotateForwardWhenWalking(), and Terraria.DelegateMethods.CharacterPreview.FloatAndSpinWhenWalking().