textore
This commit is contained in:
1 parent
5ae589dc3c
commit
46a48bbcdc
9 files changed
+18
-25
No files matched your search
@@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
Blue = 5,
|
||||
Violet = 6
|
||||
}
|
||||
public static Color BackglowColor => new Color(20, 0, 30, 80);
|
||||
public static Color BackglowColor => new Color(20, 0, 30, 40);
|
||||
public int currentMode = (int)BossMode.Day;
|
||||
public int colorShiftTimer = -1;
|
||||
|
||||
|
||||
@@ -97,11 +97,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 6f);
|
||||
|
||||
Texture2D texture = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyBlastNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -100,12 +100,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f);
|
||||
|
||||
{
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyBombNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,11 +72,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f);
|
||||
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyFireNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -85,11 +85,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f);
|
||||
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyFire2Night").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,11 +89,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f);
|
||||
|
||||
Texture2D texture = Projectile.maxPenetrate == (int)Providence.BossMode.Day ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/HolyFlareNight").Value;
|
||||
int num214 = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -113,12 +113,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f);
|
||||
|
||||
Texture2D texture2D13 = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value;
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,12 +80,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f);
|
||||
|
||||
Texture2D texture2D13 = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlobNight").Value;
|
||||
Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? ModContent.Request<Texture2D>(Texture).Value : ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/MoltenBlobNight").Value;
|
||||
int num214 = ModContent.Request<Texture2D>(Texture).Value.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = num214 * Projectile.frame;
|
||||
Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
Projectile.DrawBackglow(Providence.BackglowColor, 4f, texture);
|
||||
Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -507,9 +507,9 @@ namespace CalamityMod
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void DrawBackglow(this Projectile projectile, Color backglowColor, float backglowArea, Rectangle? frame = null)
|
||||
public static void DrawBackglow(this Projectile projectile, Color backglowColor, float backglowArea, Texture2D? texture = null, Rectangle? frame = null)
|
||||
{
|
||||
Texture2D texture = TextureAssets.Projectile[projectile.type].Value;
|
||||
texture ??= TextureAssets.Projectile[projectile.type].Value;
|
||||
|
||||
// Use a fallback for the frame.
|
||||
frame ??= texture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame);
|
||||
@@ -524,9 +524,9 @@ namespace CalamityMod
|
||||
}
|
||||
}
|
||||
|
||||
public static void DrawProjectileWithBackglow(this Projectile projectile, Color backglowColor, Color lightColor, float backglowArea, Rectangle? frame = null)
|
||||
public static void DrawProjectileWithBackglow(this Projectile projectile, Color backglowColor, Color lightColor, float backglowArea, Texture2D? texture = null, Rectangle? frame = null)
|
||||
{
|
||||
Texture2D texture = TextureAssets.Projectile[projectile.type].Value;
|
||||
texture ??= TextureAssets.Projectile[projectile.type].Value;
|
||||
|
||||
// Use a fallback for the frame.
|
||||
frame ??= texture.Frame(1, Main.projFrames[projectile.type], 0, projectile.frame);
|
||||
@@ -534,7 +534,7 @@ namespace CalamityMod
|
||||
Vector2 drawPosition = projectile.Center - Main.screenPosition;
|
||||
Vector2 origin = frame.Value.Size() * 0.5f;
|
||||
|
||||
projectile.DrawBackglow(backglowColor, backglowArea, frame);
|
||||
projectile.DrawBackglow(backglowColor, backglowArea, texture, frame);
|
||||
Main.spriteBatch.Draw(texture, drawPosition, frame, projectile.GetAlpha(lightColor), projectile.rotation, origin, projectile.scale, 0, 0f);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user