adapt ooga booga C# code style

This commit is contained in:
2025-12-22 17:59:47 +01:00
parent ee06338f22
commit 50d7f8b0d2
11 changed files with 69 additions and 51 deletions
@@ -6,8 +6,10 @@ using Terraria.ModLoader;
namespace YHTMod.Projectiles.Weapons;
class CopperSwordOnAStickProjectile : ModProjectile {
public override void SetDefaults() {
class CopperSwordOnAStickProjectile : ModProjectile
{
public override void SetDefaults()
{
Projectile.width = 80;
Projectile.height = 80;
@@ -21,12 +23,14 @@ class CopperSwordOnAStickProjectile : ModProjectile {
Projectile.aiStyle = ProjAIStyleID.ShortSword;
}
public override void AI() {
public override void AI()
{
base.AI();
float random = (float) (Random.Shared.NextDouble() / 5f);
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2 - MathHelper.PiOver4 * Projectile.spriteDirection;
float random = (float)(Random.Shared.NextDouble() / 5f);
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2 -
MathHelper.PiOver4 * Projectile.spriteDirection;
Projectile.rotation += random;
DrawOriginOffsetX = 0;
DrawOffsetX = 0;
}
}
}