コード例 #1
0
ファイル: Hauptteil.cs プロジェクト: StWol/Last-Man
 // ***************************************************************************
 // 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;
 }
コード例 #2
0
ファイル: Weapon.cs プロジェクト: StWol/Last-Man
 // ***************************************************************************
 // 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;
 }
コード例 #3
0
ファイル: UIWeaponPanel.cs プロジェクト: StWol/Last-Man
 public void SetHauptteilIcon(Hauptteil hauptteil)
 {
     hauptteilCraftingIcon = hauptteil.CraftingItem;
 }
コード例 #4
0
ファイル: InventarPanel.cs プロジェクト: StWol/Last-Man
 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 );
 }
コード例 #5
0
ファイル: UIInfoPanel.cs プロジェクト: StWol/Last-Man
        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);
        }
コード例 #6
0
ファイル: UIConstructionPanel.cs プロジェクト: StWol/Last-Man
        public void SetHauptteil(Hauptteil newHauptteil)
        {
            DecrimentRequired(Hauptteil);
            IncrementRequired(newHauptteil);

            Hauptteil = newHauptteil;
            weaponPanel.SetHauptteilIcon(newHauptteil);
            rateOfFireButton.Text = rateOfFire + GetTotalRateOfFire();
        }