Terraria.Player.UpdateImmunity C# (CSharp) Method

UpdateImmunity() public method

public UpdateImmunity ( ) : void
return void
        public void UpdateImmunity()
        {
            if (this.immune)
            {
                --this.immuneTime;
                if (this.immuneTime <= 0)
                    this.immune = false;
                this.immuneAlpha += this.immuneAlphaDirection * 50;
                if (this.immuneAlpha <= 50)
                {
                    this.immuneAlphaDirection = 1;
                }
                else
                {
                    if (this.immuneAlpha < 205)
                        return;
                    this.immuneAlphaDirection = -1;
                }
            }
            else
                this.immuneAlpha = 0;
        }
Player