Made francisca and tomahawk rotation dependant on velocity

This commit is contained in:
Shucks committed 2020-01-14 20:54:31 -06:00
1 parent 347959293b
commit 969fb01962
2 files changed
+8 -2

No files matched your search

+4 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Items.Weapons.Rogue;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -33,7 +34,9 @@ namespace CalamityMod.Projectiles.Rogue
projectile.penetrate = -1;
}
projectile.rotation += 0.4f * projectile.direction;
float rotateratio = 0.019f;
float rotation = (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * rotateratio;
projectile.rotation += rotation * projectile.direction;
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
if (projectile.velocity.Y > 16f)
+4 -1
View File
@@ -1,6 +1,7 @@
using CalamityMod.Items.Weapons.Rogue;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -33,7 +34,9 @@ namespace CalamityMod.Projectiles.Rogue
projectile.penetrate = -1;
}
projectile.rotation += 0.4f * projectile.direction;
float rotateratio = 0.019f;
float rotation = (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * rotateratio;
projectile.rotation += rotation * projectile.direction;
projectile.velocity.Y = projectile.velocity.Y + 0.2f;
if (projectile.velocity.Y > 16f)