当前位置: 首页>>代码示例>>C#>>正文


C# Player.GetImmuneAlpha2方法代码示例

本文整理汇总了C#中Terraria.Player.GetImmuneAlpha2方法的典型用法代码示例。如果您正苦于以下问题:C# Player.GetImmuneAlpha2方法的具体用法?C# Player.GetImmuneAlpha2怎么用?C# Player.GetImmuneAlpha2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Terraria.Player的用法示例。


在下文中一共展示了Player.GetImmuneAlpha2方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: drawPlayer

        protected void drawPlayer(Player drawPlayer)
        {
            SpriteEffects effects = SpriteEffects.None;
            SpriteEffects effects2 = SpriteEffects.FlipHorizontally;
            Color color = drawPlayer.GetImmuneAlpha(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), Color.White, 1));
            Color color2 = drawPlayer.GetImmuneAlpha(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.eyeColor, 1));
            Color color3 = drawPlayer.GetImmuneAlpha(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.hairColor, 1));
            Color color4 = drawPlayer.GetImmuneAlpha(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.skinColor, 1));
            Color color5 = drawPlayer.GetImmuneAlpha(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.skinColor, 1));
            Color immuneAlpha = drawPlayer.GetImmuneAlpha(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.skinColor, 1));
            Color color6 = drawPlayer.GetImmuneAlpha2(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.shirtColor, 1));
            Color color7 = drawPlayer.GetImmuneAlpha2(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.underShirtColor, 1));
            Color color8 = drawPlayer.GetImmuneAlpha2(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.pantsColor, 1));
            Color color9 = drawPlayer.GetImmuneAlpha2(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.shoeColor, 1));
            Color color10 = drawPlayer.GetImmuneAlpha2(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16, Color.White, 1));
            Color color11 = drawPlayer.GetImmuneAlpha2(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16, Color.White, 1));
            Color color12 = drawPlayer.GetImmuneAlpha2(GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16, Color.White, 1));

            float num = 1f;
            float num2 = 1f;
            float num3 = 1f;
            float num4 = 1f;
            if (drawPlayer.poisoned)
            {
                if (Main.rand.Next(50) == 0)
                {
                    int num5 = Dust.NewDust(drawPlayer.position, drawPlayer.width, drawPlayer.height, 46, 0f, 0f, 150, default(Color), 0.2f);
                    Main.dust[num5].noGravity = true;
                    Main.dust[num5].fadeIn = 1.9f;
                }
                num *= 0.65f;
                num3 *= 0.75f;
            }
            if (drawPlayer.onFire)
            {
                if (Main.rand.Next(4) == 0)
                {
                    int num6 = Dust.NewDust(new Vector2(drawPlayer.position.X - 2f, drawPlayer.position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 6, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, default(Color), 3f);
                    Main.dust[num6].noGravity = true;
                    Dust expr_640 = Main.dust[num6];
                    expr_640.velocity *= 1.8f;
                    Dust expr_662_cp_0 = Main.dust[num6];
                    expr_662_cp_0.velocity.Y = expr_662_cp_0.velocity.Y - 0.5f;
                }
                num3 *= 0.6f;
                num2 *= 0.7f;
            }
            if (drawPlayer.onFire2)
            {
                if (Main.rand.Next(4) == 0)
                {
                    int num7 = Dust.NewDust(new Vector2(drawPlayer.position.X - 2f, drawPlayer.position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 75, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, default(Color), 3f);
                    Main.dust[num7].noGravity = true;
                    Dust expr_72B = Main.dust[num7];
                    expr_72B.velocity *= 1.8f;
                    Dust expr_74D_cp_0 = Main.dust[num7];
                    expr_74D_cp_0.velocity.Y = expr_74D_cp_0.velocity.Y - 0.5f;
                }
                num3 *= 0.6f;
                num2 *= 0.7f;
            }
            if (drawPlayer.noItems)
            {
                num2 *= 0.8f;
                num *= 0.65f;
            }
            if (drawPlayer.blind)
            {
                num2 *= 0.65f;
                num *= 0.7f;
            }
            if (drawPlayer.bleed)
            {
                num2 *= 0.9f;
                num3 *= 0.9f;
                if (!drawPlayer.dead && Main.rand.Next(30) == 0)
                {
                    int num8 = Dust.NewDust(drawPlayer.position, drawPlayer.width, drawPlayer.height, 5, 0f, 0f, 0, default(Color), 1f);
                    Dust expr_820_cp_0 = Main.dust[num8];
                    expr_820_cp_0.velocity.Y = expr_820_cp_0.velocity.Y + 0.5f;
                    Dust expr_839 = Main.dust[num8];
                    expr_839.velocity *= 0.25f;
                }
            }
            if (num != 1f || num2 != 1f || num3 != 1f || num4 != 1f)
            {
                if (drawPlayer.onFire || drawPlayer.onFire2)
                {
                    color = drawPlayer.GetImmuneAlpha(Color.White);
                    color2 = drawPlayer.GetImmuneAlpha(drawPlayer.eyeColor);
                    color3 = drawPlayer.GetImmuneAlpha(drawPlayer.hairColor);
                    color4 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor);
                    color5 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor);
                    color6 = drawPlayer.GetImmuneAlpha(drawPlayer.shirtColor);
                    color7 = drawPlayer.GetImmuneAlpha(drawPlayer.underShirtColor);
                    color8 = drawPlayer.GetImmuneAlpha(drawPlayer.pantsColor);
                    color9 = drawPlayer.GetImmuneAlpha(drawPlayer.shoeColor);
                    color10 = drawPlayer.GetImmuneAlpha(Color.White);
                    color11 = drawPlayer.GetImmuneAlpha(Color.White);
                    color12 = drawPlayer.GetImmuneAlpha(Color.White);
//.........这里部分代码省略.........
开发者ID:dantedom,项目名称:editormod,代码行数:101,代码来源:Mods+(dante+star's+conflicted+copy+2011-12-28).cs

示例2: DrawPlayer

 protected void DrawPlayer(Player drawPlayer)
 {
     int index = 0;
     int index2 = 0;
     int index3 = 0;
     if (drawPlayer.dye[0] != null)
     {
         index = (int)drawPlayer.dye[0].dye;
     }
     if (drawPlayer.dye[1] != null)
     {
         index2 = (int)drawPlayer.dye[1].dye;
     }
     if (drawPlayer.dye[2] != null)
     {
         index3 = (int)drawPlayer.dye[2].dye;
     }
     if (drawPlayer.shadow == 0f)
     {
         drawPlayer.position.Y = drawPlayer.position.Y + drawPlayer.gfxOffY;
     }
     drawPlayer.itemLocation.Y = drawPlayer.itemLocation.Y + drawPlayer.gfxOffY;
     SpriteEffects effects = SpriteEffects.None;
     Color color = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), Color.White));
     Color color2 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.eyeColor));
     Color color3 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.hairColor));
     Color color4 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.skinColor));
     Color color5 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.skinColor));
     Color immuneAlpha = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.skinColor));
     Color color6 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.shirtColor));
     Color color7 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.underShirtColor));
     Color color8 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.pantsColor));
     Color color9 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.shoeColor));
     Color color10 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16, Color.White));
     Color color11 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16, Color.White));
     Color color12 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16, Color.White));
     if (drawPlayer.head > 0 && drawPlayer.head < 112)
     {
         this.LoadArmorHead(drawPlayer.head);
     }
     if (drawPlayer.body > 0 && drawPlayer.body < 75)
     {
         this.LoadArmorBody(drawPlayer.body);
     }
     if (drawPlayer.legs > 0 && drawPlayer.legs < 64)
     {
         this.LoadArmorLegs(drawPlayer.legs);
     }
     this.LoadHair(drawPlayer.hair);
     if ((drawPlayer.head == 78 || drawPlayer.head == 79 || drawPlayer.head == 80) && drawPlayer.body == 51 && drawPlayer.legs == 47)
     {
         float num = (float)Main.mouseTextColor / 200f - 0.3f;
         if (drawPlayer.shadow != 0f)
         {
             num = 0f;
         }
         color10.G = (byte)((float)color10.G * num);
         color11.G = (byte)((float)color11.G * num);
         color12.G = (byte)((float)color12.G * num);
         color10.B = (byte)((float)color10.B * num);
         color10.R = (byte)((float)color10.R * num);
         color11.B = (byte)((float)color11.B * num);
         color11.R = (byte)((float)color11.R * num);
         color12.B = (byte)((float)color12.B * num);
         color12.R = (byte)((float)color12.R * num);
     }
     if (drawPlayer.shadow > 0f)
     {
         immuneAlpha = new Color(0, 0, 0, 0);
         color5 = new Color(0, 0, 0, 0);
         color4 = new Color(0, 0, 0, 0);
         color3 = new Color(0, 0, 0, 0);
         color2 = new Color(0, 0, 0, 0);
         color = new Color(0, 0, 0, 0);
     }
     float num2 = 1f;
     float num3 = 1f;
     float num4 = 1f;
     float num5 = 1f;
     if (drawPlayer.honey && Main.rand.Next(30) == 0)
     {
         int num6 = Dust.NewDust(drawPlayer.position, drawPlayer.width, drawPlayer.height, 152, 0f, 0f, 150, default(Color), 1f);
         Main.dust[num6].velocity.Y = 0.3f;
         Dust expr_79B_cp_0 = Main.dust[num6];
         expr_79B_cp_0.velocity.X = expr_79B_cp_0.velocity.X * 0.1f;
         Main.dust[num6].scale += (float)Main.rand.Next(3, 4) * 0.1f;
         Main.dust[num6].alpha = 100;
         Main.dust[num6].noGravity = true;
         Main.dust[num6].velocity += drawPlayer.velocity * 0.1f;
     }
     if (drawPlayer.poisoned)
     {
         if (Main.rand.Next(50) == 0)
         {
             int num7 = Dust.NewDust(drawPlayer.position, drawPlayer.width, drawPlayer.height, 46, 0f, 0f, 150, default(Color), 0.2f);
             Main.dust[num7].noGravity = true;
             Main.dust[num7].fadeIn = 1.9f;
         }
         num2 *= 0.65f;
         num4 *= 0.75f;
//.........这里部分代码省略.........
开发者ID:brianmcmichael,项目名称:Terraria-Source-Code,代码行数:101,代码来源:Main.cs

示例3: DrawPlayer

 protected void DrawPlayer(Player drawPlayer)
 {
     SpriteEffects none = SpriteEffects.None;
     SpriteEffects flipHorizontally = SpriteEffects.FlipHorizontally;
     Color immuneAlpha = drawPlayer.GetImmuneAlpha(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.25)) / 16.0), Color.White));
     Color newColor = drawPlayer.GetImmuneAlpha(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.25)) / 16.0), drawPlayer.eyeColor));
     Color color3 = drawPlayer.GetImmuneAlpha(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.25)) / 16.0), drawPlayer.hairColor));
     Color color4 = drawPlayer.GetImmuneAlpha(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.25)) / 16.0), drawPlayer.skinColor));
     Color color5 = drawPlayer.GetImmuneAlpha(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.5)) / 16.0), drawPlayer.skinColor));
     Color color = drawPlayer.GetImmuneAlpha(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.75)) / 16.0), drawPlayer.skinColor));
     Color color7 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.5)) / 16.0), drawPlayer.shirtColor));
     Color color8 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.5)) / 16.0), drawPlayer.underShirtColor));
     Color color9 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.75)) / 16.0), drawPlayer.pantsColor));
     Color color10 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, (int)((drawPlayer.position.Y + (drawPlayer.height * 0.75)) / 16.0), drawPlayer.shoeColor));
     Color color11 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, ((int)(drawPlayer.position.Y + (drawPlayer.height * 0.25))) / 0x10, Color.White));
     Color color12 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, ((int)(drawPlayer.position.Y + (drawPlayer.height * 0.5))) / 0x10, Color.White));
     Color color13 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor(((int)(drawPlayer.position.X + (drawPlayer.width * 0.5))) / 0x10, ((int)(drawPlayer.position.Y + (drawPlayer.height * 0.75))) / 0x10, Color.White));
     if (drawPlayer.shadow > 0f)
     {
         color = new Color(0, 0, 0, 0);
         color5 = new Color(0, 0, 0, 0);
         color4 = new Color(0, 0, 0, 0);
         color3 = new Color(0, 0, 0, 0);
         newColor = new Color(0, 0, 0, 0);
         immuneAlpha = new Color(0, 0, 0, 0);
     }
     float r = 1f;
     float g = 1f;
     float b = 1f;
     float a = 1f;
     if (drawPlayer.poisoned)
     {
         if (rand.Next(50) == 0)
         {
             int index = Dust.NewDust(drawPlayer.position, drawPlayer.width, drawPlayer.height, 0x2e, 0f, 0f, 150, new Color(), 0.2f);
             dust[index].noGravity = true;
             dust[index].fadeIn = 1.9f;
         }
         r *= 0.65f;
         b *= 0.75f;
     }
     if (drawPlayer.onFire)
     {
         if (rand.Next(4) == 0)
         {
             int num6 = Dust.NewDust(new Vector2(drawPlayer.position.X - 2f, drawPlayer.position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 6, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, new Color(), 3f);
             dust[num6].noGravity = true;
             Dust dust1 = dust[num6];
             dust1.velocity = (Vector2)(dust1.velocity * 1.8f);
             dust[num6].velocity.Y -= 0.5f;
         }
         b *= 0.6f;
         g *= 0.7f;
     }
     if (drawPlayer.onFire2)
     {
         if (rand.Next(4) == 0)
         {
             int num7 = Dust.NewDust(new Vector2(drawPlayer.position.X - 2f, drawPlayer.position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 0x4b, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, new Color(), 3f);
             dust[num7].noGravity = true;
             Dust dust2 = dust[num7];
             dust2.velocity = (Vector2)(dust2.velocity * 1.8f);
             dust[num7].velocity.Y -= 0.5f;
         }
         b *= 0.6f;
         g *= 0.7f;
     }
     if (drawPlayer.noItems)
     {
         g *= 0.8f;
         r *= 0.65f;
     }
     if (drawPlayer.blind)
     {
         g *= 0.65f;
         r *= 0.7f;
     }
     if (drawPlayer.bleed)
     {
         g *= 0.9f;
         b *= 0.9f;
         if (!drawPlayer.dead && (rand.Next(30) == 0))
         {
             int num8 = Dust.NewDust(drawPlayer.position, drawPlayer.width, drawPlayer.height, 5, 0f, 0f, 0, new Color(), 1f);
             dust[num8].velocity.Y += 0.5f;
             Dust dust3 = dust[num8];
             dust3.velocity = (Vector2)(dust3.velocity * 0.25f);
         }
     }
     if (((r != 1f) || (g != 1f)) || ((b != 1f) || (a != 1f)))
     {
         if (drawPlayer.onFire || drawPlayer.onFire2)
         {
             immuneAlpha = drawPlayer.GetImmuneAlpha(Color.White);
             newColor = drawPlayer.GetImmuneAlpha(drawPlayer.eyeColor);
             color3 = drawPlayer.GetImmuneAlpha(drawPlayer.hairColor);
             color4 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor);
             color5 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor);
             color7 = drawPlayer.GetImmuneAlpha(drawPlayer.shirtColor);
             color8 = drawPlayer.GetImmuneAlpha(drawPlayer.underShirtColor);
//.........这里部分代码省略.........
开发者ID:Heloo88,项目名称:ModTerraria_Heloo,代码行数:101,代码来源:Main.cs

示例4: DrawPlayer


//.........这里部分代码省略.........
     if (num12 == 65)
     {
         num12 = num18;
     }
     if (num13 == 65)
     {
         num13 = num18;
     }
     if (num14 == 65)
     {
         num14 = num18;
     }
     if (num15 == 65)
     {
         num15 = num18;
     }
     if (num16 == 65)
     {
         num16 = num18;
     }
     if (drawPlayer.shadow == 0f)
     {
         drawPlayer.position.Y = drawPlayer.position.Y + drawPlayer.gfxOffY;
     }
     drawPlayer.itemLocation.Y = drawPlayer.itemLocation.Y + drawPlayer.gfxOffY;
     SpriteEffects effects = SpriteEffects.None;
     SpriteEffects effects2 = SpriteEffects.FlipHorizontally;
     Color color = drawPlayer.GetImmuneAlpha(drawPlayer.GetHairColor(true));
     Color color2 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), Color.White));
     Color color3 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.eyeColor));
     Color color4 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.skinColor));
     Color color5 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.skinColor));
     Color immuneAlpha = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.skinColor));
     Color color6 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.shirtColor));
     Color color7 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.underShirtColor));
     Color color8 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.pantsColor));
     Color color9 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.shoeColor));
     Color color10 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.25) / 16, Color.White));
     Color color11 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.5) / 16, Color.White));
     Color color12 = drawPlayer.GetImmuneAlpha2(Lighting.GetColor((int)((double)drawPlayer.position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)drawPlayer.position.Y + (double)drawPlayer.height * 0.75) / 16, Color.White));
     if (drawPlayer.head > 0 && drawPlayer.head < 160)
     {
         this.LoadArmorHead(drawPlayer.head);
     }
     if (drawPlayer.body > 0 && drawPlayer.body < 168)
     {
         this.LoadArmorBody(drawPlayer.body);
     }
     if (drawPlayer.legs > 0 && drawPlayer.legs < 103)
     {
         this.LoadArmorLegs(drawPlayer.legs);
     }
     if (drawPlayer.handon > 0 && drawPlayer.handon < 18)
     {
         this.LoadAccHandsOn((int)drawPlayer.handon);
     }
     if (drawPlayer.handoff > 0 && drawPlayer.handoff < 11)
     {
         this.LoadAccHandsOff((int)drawPlayer.handoff);
     }
     if (drawPlayer.back > 0 && drawPlayer.back < 8)
     {
         this.LoadAccBack((int)drawPlayer.back);
     }
     if (drawPlayer.front > 0 && drawPlayer.front < 5)
     {
开发者ID:TerrariaJava,项目名称:ExecutableSRC,代码行数:67,代码来源:Main.cs


注:本文中的Terraria.Player.GetImmuneAlpha2方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。