Esempio n. 1
0
 public PlayerGhostShield(LevelEntity owner) : base(false, false)
 {
     this.owner  = owner;
     this.sprite = TFGame.SpriteData.GetSpritePartInt("Shield");
     if (owner is PlayerGhost)
     {
         PlayerGhost ghost = owner as PlayerGhost;
         this.sprite.Color = ArcherData.GetColorB(ghost.PlayerIndex, ghost.Allegiance);
         if (ghost.Allegiance != Allegiance.Neutral)
         {
             this.particleType = Particles.TeamDash[(int)ghost.Allegiance];
         }
         else
         {
             this.particleType = Particles.Dash[ghost.PlayerIndex];
         }
     }
     else
     {
         this.sprite.Color = ArcherData.Enemies.ColorB;
         this.particleType = Particles.TeamDash[1];
     }
     this.sprite.Play(0, false);
     base.Add(this.sprite);
     this.sine = new SineWave(120);
     base.Add(this.sine);
 }
Esempio n. 2
0
        public override void Render()
        {
            Patcher.Patcher.CallRealBase();
            MenuPanel.DrawPanel(base.X - 80f, base.Y - 23f, 160f, 46f);
            Draw.TextCentered(TFGame.Font, this.variant.Title, base.Position + ((Vector2)(Vector2.UnitY * -8f)), Color.White);
            for (int i = 0; i < 8; i++)
            {
                if (TFGame.Players[i])
                {
                    Color color = (this.selection == i) ? ArcherData.GetColorB(i, Allegiance.Neutral) : ArcherData.GetColorA(i, Allegiance.Neutral);
                    float num2  = (this.variant[i] ? 2f : 1f) + (this.wigglers[i].Value * 0.3f);
                    Draw.TextCentered(TFGame.Font, this.PlayerTitles2[i], (base.Position + this.PlayerPositions2[i]) + new Vector2(0f, 7f), color, (Vector2)(Vector2.One * num2), 0f);
                }
            }
            Vector2 position = (base.Position + this.cursor) + ((Vector2)(Vector2.UnitY * (30f - (4f * this.cursorSine.Value))));
            Color   colorB   = ArcherData.GetColorB(this.selection, Allegiance.Neutral);
            Vector2 scale    = new Vector2(1f, -1f + (0.2f * this.cursorSine.Value));

            Draw.OutlineTextureJustify(TFGame.MenuAtlas["variantPerPlayerArrow"], position, colorB, scale, new Vector2(0.5f, 1f));
        }