示例#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 );
 }
示例#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);
        }
示例#3
0
文件: Player.cs 项目: StWol/Last-Man
        /// <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);
        }
示例#4
0
文件: Powerup.cs 项目: StWol/Last-Man
 public Powerup Clone()
 {
     Powerup p = new Powerup(GetInner());
     p.Renderer = Renderer.Clone();
     p.LocationBehavior = LocationBehavior.Clone();
     return p;
 }