diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2018-01-16 22:56:47 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2018-01-16 22:56:47 +0100 |
| commit | f03a7cf3e3beab8964cd142ce64fd6dc3cd0735f (patch) | |
| tree | 38f2a23fc4c46a8aef415cbbb9af8081c9057173 /Penguloon/Objects | |
| parent | 5de3254aa0d6f69dbb6e08ddd699c3f78797be3b (diff) | |
started working on object selling
Diffstat (limited to 'Penguloon/Objects')
| -rw-r--r-- | Penguloon/Objects/ObjectBase.cs | 39 | ||||
| -rw-r--r-- | Penguloon/Objects/PenguinObject.cs | 3 |
2 files changed, 4 insertions, 38 deletions
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<ObjectUpgrade> UpgradeList { get; set; } = new List<ObjectUpgrade>(); + 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) |
