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 ); }
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); }
/// <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); }
public Powerup Clone() { Powerup p = new Powerup(GetInner()); p.Renderer = Renderer.Clone(); p.LocationBehavior = LocationBehavior.Clone(); return p; }