1 - More.
This commit is contained in:
1 parent
43c7fec395
commit
5fa917d9f8
14 files changed
+33
-19
No files matched your search
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -313,7 +314,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor)
|
||||
{
|
||||
Texture2D critterTexture = Main.npcTexture[NPC.type];
|
||||
Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/NPCs/DraedonLabThings/RepairUnitCritterGlowmask").Value;
|
||||
Vector2 drawPosition = NPC.Center - Main.screenPosition + Vector2.UnitY * NPC.gfxOffY;
|
||||
SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
|
||||
@@ -10,6 +10,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Graphics.Shaders;
|
||||
@@ -1449,7 +1450,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ScarletDevilStreak").Value);
|
||||
|
||||
int numAfterimages = ChargeComboFlash > 0f ? 0 : 5;
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
Vector2 origin = NPC.Size * 0.5f;
|
||||
Vector2 center = NPC.Center - Main.screenPosition;
|
||||
|
||||
@@ -21,6 +21,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
@@ -987,7 +988,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
if (plasmaArm != -1)
|
||||
DrawArm(spriteBatch, Main.npc[plasmaArm].Center, armGlowmaskColor, armProperties[3].Item1, armProperties[3].Item2);
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2);
|
||||
int numAfterimages = 5;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -522,7 +523,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2);
|
||||
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -565,7 +566,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2);
|
||||
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -521,7 +522,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2);
|
||||
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -515,7 +516,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2);
|
||||
Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White;
|
||||
|
||||
@@ -10,6 +10,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -1255,7 +1256,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ScarletDevilStreak").Value);
|
||||
|
||||
int numAfterimages = ChargeFlash > 0f ? 0 : 5;
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
Vector2 origin = NPC.Size * 0.5f;
|
||||
Vector2 center = NPC.Center - Main.screenPosition;
|
||||
|
||||
@@ -6,6 +6,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -623,7 +624,7 @@ namespace CalamityMod.NPCs.ExoMechs
|
||||
{
|
||||
spriteBatch.EnterShaderRegion();
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Texture2D glowmask = ModContent.Request<Texture2D>("CalamityMod/NPCs/ExoMechs/DraedonGlowmask").Value;
|
||||
Rectangle frame = NPC.frame;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
@@ -595,8 +596,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Vector2 vector = new Vector2(Main.npcTexture[NPC.type].Width / 2, Main.npcTexture[NPC.type].Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
|
||||
Vector2 center = NPC.Center - Main.screenPosition;
|
||||
center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
@@ -596,8 +597,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Vector2 vector = new Vector2(Main.npcTexture[NPC.type].Width / 2, Main.npcTexture[NPC.type].Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
|
||||
Vector2 center = NPC.Center - Main.screenPosition;
|
||||
center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f;
|
||||
|
||||
@@ -10,6 +10,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Skies;
|
||||
@@ -1024,8 +1025,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Vector2 vector = new Vector2(Main.npcTexture[NPC.type].Width / 2, Main.npcTexture[NPC.type].Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
|
||||
Vector2 center = NPC.Center - Main.screenPosition;
|
||||
center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
@@ -596,8 +597,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture = Main.npcTexture[NPC.type];
|
||||
Vector2 vector = new Vector2(Main.npcTexture[NPC.type].Width / 2, Main.npcTexture[NPC.type].Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
Texture2D texture = TextureAssets.Npc[NPC.type].Value;
|
||||
Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2);
|
||||
|
||||
Vector2 center = NPC.Center - Main.screenPosition;
|
||||
center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f;
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
@@ -531,8 +532,8 @@ namespace CalamityMod.NPCs.GreatSandShark
|
||||
}
|
||||
Color color24 = NPC.GetAlpha(drawColor);
|
||||
Color color25 = Lighting.GetColor((int)((double)NPC.position.X + (double)NPC.width * 0.5) / 16, (int)(((double)NPC.position.Y + (double)NPC.height * 0.5) / 16.0));
|
||||
Texture2D texture2D3 = Main.npcTexture[NPC.type];
|
||||
int num156 = Main.npcTexture[NPC.type].Height / Main.npcFrameCount[NPC.type];
|
||||
Texture2D texture2D3 = TextureAssets.Npc[NPC.type].Value;
|
||||
int num156 = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type];
|
||||
int y3 = num156 * (int)NPC.frameCounter;
|
||||
Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, num156);
|
||||
Vector2 origin2 = rectangle.Size() / 2f;
|
||||
|
||||
Reference in new issue
Block a user