Some of the projectile iterators
This commit is contained in:
1 parent
1a85f860e9
commit
e2c261e69e
19 files changed
+115
-119
No files matched your search
@@ -65,12 +65,10 @@ namespace CalamityMod.Graphics.Primitives
|
||||
var afterProjectiles = new List<IPixelatedPrimitiveRenderer>();
|
||||
|
||||
// Check every active projectile.
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile projectile in Main.ActiveProjectiles)
|
||||
{
|
||||
var projectile = Main.projectile[i];
|
||||
|
||||
// If the projectile is active, a mod projectile, and uses the interface, add it to the list of primitives to draw this frame.
|
||||
if (projectile.active && projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile)
|
||||
if (projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile)
|
||||
{
|
||||
var listToUse = pixelPrimitiveProjectile.LayerToRenderTo switch
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user