Files
CalamityModPublic/Particles/ThanatosSmokeParticleSet.cs
T
2022-01-06 18:30:56 +01:00

28 lines
988 B
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Particles
{
public class ThanatosSmokeParticleSet : BaseParticleSet
{
public override int ParticleLifetime => 30;
public float SpawnAreaCompactness;
public float RelativePower;
public float BaseMoveRotation;
public float MoveRotationOffset;
public ThanatosSmokeParticleSet(int setLifetime, int particleSpawnRate, float baseMoveRotation, float spawnAreaCompactness, float relativePower) :
base(setLifetime, particleSpawnRate)
{
MoveRotationOffset = Main.rand.NextFloat(-0.36f, 0.36f);
BaseMoveRotation = baseMoveRotation;
SpawnAreaCompactness = spawnAreaCompactness;
RelativePower = relativePower;
}
public override Particle SpawnParticle() => new ThanatosSmokeParticle(Main.rand.NextVector2Circular(1f, 1f) * SpawnAreaCompactness, ParticleLifetime, 0.06f, RelativePower, BaseMoveRotation);
}
}