Terratomere swing sound
This commit is contained in:
1 parent
adaf69fe5d
commit
721e89426e
4 files changed
+8
-4
No files matched your search
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -30,6 +31,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public static readonly Color TerraColor2 = new(83, 163, 136);
|
||||
|
||||
public static readonly SoundStyle SwingSound = new("CalamityMod/Sounds/Item/TerratomereSwing");
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Terratomere");
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 40;
|
||||
Projectile.timeLeft = 30;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
@@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.Opacity = Utils.GetLerpValue(0f, 36f, Projectile.timeLeft, true);
|
||||
Projectile.velocity *= 0.955f;
|
||||
Projectile.Opacity = Utils.GetLerpValue(0f, 26f, Projectile.timeLeft, true);
|
||||
Projectile.velocity *= 0.91f;
|
||||
Projectile.scale *= 1.01f;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
// Create the slash.
|
||||
if (Time == (int)(Terratomere.SwingTime * (SwingCompletionRatio + 0.15f)))
|
||||
SoundEngine.PlaySound(SoundID.Item60 with { Pitch = 0.1f }, Projectile.Center);
|
||||
SoundEngine.PlaySound(Terratomere.SwingSound, Projectile.Center);
|
||||
|
||||
if (Main.myPlayer == Projectile.owner && Time == (int)(Terratomere.SwingTime * (SwingCompletionRatio + 0.34f)))
|
||||
{
|
||||
Vector2 bigSlashVelocity = Projectile.SafeDirectionTo(Main.MouseWorld) * Owner.ActiveItem().shootSpeed;
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user