diff options
Diffstat (limited to 'Penguloon/Objects/ObjectBase.cs')
| -rw-r--r-- | Penguloon/Objects/ObjectBase.cs | 39 |
1 files changed, 2 insertions, 37 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); |
