Files
CalamityModPublic/Projectiles/Magic/Shaderain.cs
T
2023-05-28 06:14:26 +07:00

37 lines
1.0 KiB
C#

using CalamityMod.Items.Weapons.Magic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class Shaderain : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/Magic/AuraRain";
public override void SetDefaults()
{
Projectile.timeLeft = 600;
Projectile.width = 20;
Projectile.height = 20;
Projectile.netImportant = true;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.DamageType = DamageClass.Magic;
}
public override void AI()
{
// The projectile will fall.
Projectile.velocity.Y += ShaderainStaff.GravityStrenght;
// The projectile will look towards where it's going.
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
Projectile.netUpdate = true;
}
}
}