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

◆ EmitGolfCartSmoke()

static void Terraria.Mount.EmitGolfCartSmoke ( Player mountedPlayer,
bool rushing )
inlinestaticprivate

Definition at line 3876 of file Mount.cs.

3877 {
3878 Vector2 position = mountedPlayer.Bottom + new Vector2(-mountedPlayer.direction * 34, (0f - mountedPlayer.gravDir) * 12f);
3879 Dust dust = Dust.NewDustDirect(position, 0, 0, 31, -mountedPlayer.direction, (0f - mountedPlayer.gravDir) * 0.24f, 100);
3880 dust.position = position;
3881 dust.velocity *= 0.1f;
3882 dust.velocity += new Vector2(-mountedPlayer.direction, (0f - mountedPlayer.gravDir) * 0.25f);
3883 dust.scale = 0.5f;
3884 if (mountedPlayer.velocity.X != 0f)
3885 {
3886 dust.velocity += new Vector2((float)Math.Sign(mountedPlayer.velocity.X) * 1.3f, 0f);
3887 }
3888 if (rushing)
3889 {
3890 dust.fadeIn = 0.8f;
3891 }
3892 }
static int Sign(decimal value)
Definition Math.cs:1202

References Terraria.Dust.NewDustDirect(), System.Math.Sign(), and Microsoft.Xna.Framework.Graphics.Vector2.