From f03a7cf3e3beab8964cd142ce64fd6dc3cd0735f Mon Sep 17 00:00:00 2001 From: aldrikboy Date: Tue, 16 Jan 2018 22:56:47 +0100 Subject: started working on object selling --- Penguloon/Objects/ObjectBase.cs | 39 ++------------------------------------ Penguloon/Objects/PenguinObject.cs | 3 ++- 2 files changed, 4 insertions(+), 38 deletions(-) (limited to 'Penguloon/Objects') diff --git a/Penguloon/Objects/ObjectBase.cs b/Penguloon/Objects/ObjectBase.cs index c71b5e3..d1ed0d4 100644 --- a/Penguloon/Objects/ObjectBase.cs +++ b/Penguloon/Objects/ObjectBase.cs @@ -48,36 +48,14 @@ namespace Penguloon.Objects public List UpgradeList { get; set; } = new List(); + public SpriteFont InfoPanelFont { get; set; } + public ObjectBase(Vector2 position, Map map) { this.Map = map; this.Position = position; - this.AttackSpeedMSBase = AttackSpeedMS; - this.RangeBase = Range; - CreateUpgrades(); - - SetInfoPanel(); - } - - private void SetInfoPanel() - { - InfoPanelTexture = ContentManager.GetTexture("UI/objectinfo"); - InfoPanelLineTexture = ContentManager.GetTexture("UI/objectinfo-line"); - - // align right - if (Position.X < 450) - { - InfoPanelPos = new Vector2(Position.X + (TileSpanX * Map.TileWidth), Position.Y); - InfoPanelRotation = 3.14f; - } - // align left - else - { - InfoPanelPos = new Vector2(Position.X - StaticUIValues.ObjectInfoPanelSize.X, Position.Y); - InfoPanelRotation = 0f; - } } public ObjectBase(Map map) @@ -217,19 +195,6 @@ namespace Penguloon.Objects destinationRectangle: rangeCircleRec, origin: new Vector2(RangeCircle.Width / 2, RangeCircle.Height / 2)); } - - DrawInfoPanel(); - } - - private void DrawInfoPanel() - { - if (!Selected) return; - - Map.ParentScene.Main.SpriteBatch.Draw(InfoPanelTexture, destinationRectangle: - new Rectangle(InfoPanelPos.ToPoint(), StaticUIValues.ObjectInfoPanelSize.ToPoint())); - - Map.ParentScene.Main.SpriteBatch.Draw(InfoPanelLineTexture, destinationRectangle: - new Rectangle(Position.ToPoint(), StaticUIValues.ObjectInfoPanelLineSize.ToPoint()), rotation: InfoPanelRotation); } public abstract void DrawUnique(float deltaTime); diff --git a/Penguloon/Objects/PenguinObject.cs b/Penguloon/Objects/PenguinObject.cs index 5310262..de48e4c 100644 --- a/Penguloon/Objects/PenguinObject.cs +++ b/Penguloon/Objects/PenguinObject.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Penguloon.Levels; using Penguloon.Projectiles; +using System; using System.Collections.Generic; namespace Penguloon.Objects @@ -37,7 +38,7 @@ namespace Penguloon.Objects public override void DrawUnique(float deltaTime) { - + } public override void UpdateUnique(float deltaTime) -- cgit v1.2.3-70-g09d2