1. Added SunkenSeaNPC abstract class. 2. Implemented it to Sharkoon. 3. Added some utility methods to the A* algorithm. 4. Flipped Sharkoon spritesheet.
25 lines
838 B
C#
25 lines
838 B
C#
using CalamityMod.NPCs.SunkenSea;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Enemy
|
|
{
|
|
public class SharkoonExplosion : ModProjectile, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Projectiles.Enemy";
|
|
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.hostile = true;
|
|
Projectile.friendly = true;
|
|
Projectile.width = Projectile.height = Sharkoon.ExplosionRadius * 2;
|
|
Projectile.timeLeft = 2;
|
|
}
|
|
|
|
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
|
=> CalamityUtils.CircularHitboxCollision(Projectile.Center, Sharkoon.ExplosionRadius, targetHitbox);
|
|
}
|
|
}
|