예제 #1
0
        public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
        {
            Texture2D shield = mod.GetTexture("BlushieBoss/Shield");
            float     alpha;

            if (BlushieBoss.Timer < 60)
            {
                alpha = 0f;
            }
            else if (BlushieBoss.Timer < 120)
            {
                int temp = (BlushieBoss.Timer - 60) % 40;
                if (temp > 20)
                {
                    temp = 40 - temp;
                }
                alpha = temp / 20f;
            }
            else if (BlushieBoss.Timer < 3600)
            {
                alpha = 1f;
            }
            else if (BlushieBoss.Timer < 3660)
            {
                int temp = (BlushieBoss.Timer - 3600) % 40;
                if (temp > 20)
                {
                    temp = 40 - temp;
                }
                alpha = 1f - temp / 20f;
            }
            else
            {
                alpha = 0f;
            }
            alpha *= 0.5f;
            if (alpha > 0f)
            {
                spriteBatch.Draw(shield, npc.Center - Main.screenPosition - new Vector2(shield.Width / 2, shield.Height / 2), null, Color.White * alpha);
            }
            BlushieBoss.DrawBullets(spriteBatch);
        }
예제 #2
0
 public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
 {
     if (BlushieBoss.Phase == 2 && BlushieBoss.Timer < 480)
     {
         Texture2D texture  = mod.GetTexture("ChaosSpirit/DissonanceOrb");
         Vector2   drawPos  = npc.Center - Main.screenPosition;
         Vector2   origin   = new Vector2(texture.Width / 2, texture.Height / 2);
         float     rotation = 0.05f * BlushieBoss.Timer;
         spriteBatch.Draw(texture, drawPos, null, Color.White, rotation, origin, 0.5f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, -rotation, origin, 0.5f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, -rotation, origin, 0.25f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, rotation, origin, 0.25f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, -rotation, origin, 1f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
     }
     else if (BlushieBoss.Phase != 3 || BlushieBoss.Phase3Attack == 0)
     {
         Texture2D shield = mod.GetTexture("Mounts/PurityShield");
         spriteBatch.Draw(shield, npc.Center - Main.screenPosition - new Vector2(shield.Width / 2, shield.Height / 2), null, Color.White * 0.5f);
     }
     BlushieBoss.DrawBullets(spriteBatch);
 }