Terraria.Player.DropTombstone C# (CSharp) Method

DropTombstone() public method

public DropTombstone ( int coinsOwned, string deathText, int hitDirection ) : void
coinsOwned int
deathText string
hitDirection int
return void
        public void DropTombstone(int coinsOwned, string deathText, int hitDirection)
        {
            if (Main.netMode == 1)
                return;
            float num1 = (float)Main.rand.Next(-35, 36) * 0.1f;
            while ((double)num1 < 2.0 && (double)num1 > -2.0)
                num1 += (float)Main.rand.Next(-30, 31) * 0.1f;
            int num2 = Main.rand.Next(6);
            int Type = coinsOwned <= 100000 ? (num2 != 0 ? 200 + num2 : 43) : Main.rand.Next(5) + 527;
            int index = Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), (float)Main.rand.Next(10, 30) * 0.1f * (float)hitDirection + num1, (float)Main.rand.Next(-40, -20) * 0.1f, Type, 0, 0.0f, Main.myPlayer, 0.0f, 0.0f);
            Main.projectile[index].miscText = this.name + deathText;
        }
Player