39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using Decimation.Lib.Items;
|
|
using Decimation.Lib.Util;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
|
|
namespace Decimation.Content.Projectiles.DuneWyrm
|
|
{
|
|
public class HourHandProjectile : DecimationProjectile
|
|
{
|
|
protected override int AnimationFrames => 3;
|
|
protected override DecimationWeapon.DamageType DamageType => DecimationWeapon.DamageType.Ranged;
|
|
protected override int Damages => 45;
|
|
|
|
protected override void Init()
|
|
{
|
|
projectile.width = 30;
|
|
projectile.height = 30;
|
|
projectile.timeLeft = 600;
|
|
projectile.penetrate = -1;
|
|
projectile.aiStyle = 8;
|
|
aiType = 253;
|
|
}
|
|
|
|
public override bool PreAI()
|
|
{
|
|
Lighting.AddLight(projectile.Center, 0f, 0f, 1f);
|
|
projectile.rotation = projectile.velocity.ToRotation();
|
|
|
|
return base.PreAI();
|
|
}
|
|
|
|
public override void Kill(int timeLeft)
|
|
{
|
|
DustUtils.NewDustCircle(12, projectile.position, projectile.width, projectile.height, 135,
|
|
projectile.scale * 3f, 4, 0);
|
|
Main.PlaySound(SoundID.Item27, projectile.Center);
|
|
}
|
|
}
|
|
} |