Decimation_Mod/Content/Projectiles/HourHandProjectile.cs
FyloZ ec4585bed5 - Changed Bloodshot Eye's music to Boss 1 Orchestra ( https://www.youtube.com/watch?time_continue=120&v=r-9nKGc85FQ )
- Added support for animated projectiles
- Refactoring
- Removed useless fields
- Fixed swords not dealing damages
- Added Hour Hand (from Evie's PR)
2020-03-21 00:11:07 -04:00

45 lines
1.2 KiB
C#

using Decimation.Lib.Items;
using Terraria;
namespace Decimation.Content.Projectiles
{
public class HourHandProjectile : DecimationProjectile
{
protected override int AnimationFrames => 4;
protected override DecimationWeapon.DamageType DamageType => DecimationWeapon.DamageType.Ranged;
protected override int Damages => 45;
public override void SetStaticDefaults()
{
Main.projFrames[projectile.type] = 4;
}
protected override void Init()
{
projectile.width = 10;
projectile.height = 10;
projectile.timeLeft = 600;
projectile.penetrate = 1;
projectile.aiStyle = 8;
aiType = 253;
}
public override bool PreAI()
{
if (++projectile.frameCounter >= 5)
{
projectile.frameCounter = 0;
if (++projectile.frame >= 4)
{
projectile.frame = 0;
}
}
Lighting.AddLight(projectile.Center, 0f, 0f, 1f);
projectile.rotation = projectile.velocity.ToRotation();
return true;
}
}
}