// *************************************************************************** // Clont Object public Hauptteil Clone() { Hauptteil h = new Hauptteil(TypeId, Group, Name,RateOfFire, Weight,Description, LocationBehavior.Clone()); h.Renderer = Renderer; h.RequiredLiquid = RequiredLiquid; return h; }
// *************************************************************************** // Konstruktor public Weapon( Visier visier, Antrieb antrieb, Stabilisator stabilisator, Hauptteil hauptteil, int id, EGroup group, String name, float weight, string description, ILocationBehavior locationBehavior ) : base(id, group, name, description, weight, locationBehavior) { this.Visier = visier; this.Antrieb = antrieb; this.Stabilisator = stabilisator; this.Hauptteil = hauptteil; }
public void SetHauptteilIcon(Hauptteil hauptteil) { hauptteilCraftingIcon = hauptteil.CraftingItem; }
private void DrawHauptteil( Microsoft.Xna.Framework.Graphics.SpriteBatch sb, Hauptteil hauptteil ) { sb.DrawString( UIButton.FONT_DEFAULT, hauptteil.Name, new Vector2( TEXT_PADDING + textX, TEXT_PADDING + textY ), Color.Black ); sb.DrawString( UIButton.FONT_DEFAULT, "Feuerrate: " + hauptteil.RateOfFire, new Vector2( TEXT_PADDING + textX, TEXT_PADDING + textY + TEXT_LINE_HEIGHT * 2 ), Color.Black ); sb.DrawString( UIButton.FONT_DEFAULT, "Schüsse: " + hauptteil.ShotCount, new Vector2( TEXT_PADDING + textX, TEXT_PADDING + textY + TEXT_LINE_HEIGHT * 3 ), Color.Black ); sb.DrawString( UIButton.FONT_DEFAULT, "Gewicht: " + hauptteil.Weight, new Vector2( TEXT_PADDING + textX, TEXT_PADDING + textY + TEXT_LINE_HEIGHT * 4 ), Color.Black ); }
private void DrawHauptteil(Microsoft.Xna.Framework.Graphics.SpriteBatch sb, Hauptteil hauptteil) { int x = (int)(GetPosition().X); int y = (int)(GetPosition().Y); sb.DrawString(UIButton.FONT_DEFAULT, hauptteil.Name, new Vector2(padding + x, padding + y), Color.Black); sb.DrawString(UIButton.FONT_DEFAULT, "Feuerrate: " + hauptteil.RateOfFire + "Schüsse: " + hauptteil.ShotCount, new Vector2(padding + x, padding + y + lineHeight), Color.Black); sb.DrawString(UIButton.FONT_DEFAULT, "Gewicht: " + hauptteil.Weight, new Vector2(padding + x, padding + y + lineHeight * 2), Color.Black); }
public void SetHauptteil(Hauptteil newHauptteil) { DecrimentRequired(Hauptteil); IncrementRequired(newHauptteil); Hauptteil = newHauptteil; weaponPanel.SetHauptteilIcon(newHauptteil); rateOfFireButton.Text = rateOfFire + GetTotalRateOfFire(); }