Esempio n. 1
0
 private void DrawPowerup( Microsoft.Xna.Framework.Graphics.SpriteBatch sb, Powerup powerup )
 {
     sb.DrawString( UIButton.FONT_DEFAULT, powerup.Name, new Vector2( TEXT_PADDING + textX, TEXT_PADDING + textY ), Color.Black );
     //sb.DrawString(UIButton.FONT_DEFAULT, "Schaden: " + antrieb.Damage + " Feuerrate: " + antrieb.RateOfFire, new Vector2(textPadding + x, textPadding + y + textLineHeight), Color.Black);
     sb.DrawString( UIButton.FONT_DEFAULT, "Gewicht: " + powerup.Weight, new Vector2( TEXT_PADDING + textX, TEXT_PADDING + textY + TEXT_LINE_HEIGHT * 2 ), Color.Black );
 }
Esempio n. 2
0
        private void DrawPowerup(Microsoft.Xna.Framework.Graphics.SpriteBatch sb, Powerup powerup)
        {
            int x = (int)(GetPosition().X);
            int y = (int)(GetPosition().Y);

            sb.DrawString(UIButton.FONT_DEFAULT, powerup.Name, new Vector2(padding + x, padding + y), Color.Black);
            //sb.DrawString(UIButton.FONT_DEFAULT, "Schaden: " + antrieb.Damage + " Feuerrate: " + antrieb.RateOfFire, new Vector2(padding + x, padding + y + lineHeight), Color.Black);
            sb.DrawString(UIButton.FONT_DEFAULT, "Gewicht: " + powerup.Weight, new Vector2(padding + x, padding + y + lineHeight * 2), Color.Black);
        }
Esempio n. 3
0
        /// <summary>
        ///   Powerup benutzen und aus Inventar entfernen
        /// </summary>
        /// <param name="powerup"> Powerup, welches verbaucht wird </param>
        public void UsePowerup(Powerup powerup)
        {
            // Aus inventar löschem
            Inventar.Remove(powerup.TypeId);

            // in active liste hinzufügen
            ActivePowerups.Add(powerup);

            // Buffs des powerups adden
            AddBuffs(powerup.Buffs);
        }
Esempio n. 4
0
 public Powerup Clone()
 {
     Powerup p = new Powerup(GetInner());
     p.Renderer = Renderer.Clone();
     p.LocationBehavior = LocationBehavior.Clone();
     return p;
 }